-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
81 lines (81 loc) · 2.69 KB
/
.eslintrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
module.exports = {
parser: '@typescript-eslint/parser',
extends: [
'plugin:react/recommended',
'plugin:@typescript-eslint/recommended',
'prettier/@typescript-eslint',
'plugin:prettier/recommended',
],
plugins: ["react", "@typescript-eslint", "prettier"],
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
createDefaultProgram: true,
ecmaFeatures: {
jsx: true,
},
project: './tsconfig.json',
},
rules: {
"prettier/prettier": ["warn", {
tabWidth: 2,
semi: false,
singleQuote: true,
endOfLine:"auto",
printWidth: 100
}],
// Disabled Rules
"semi": ["error", "never"],
'react/prop-types': 'off',
'@typescript-eslint/camelcase': ['error', { properties: 'never' }],
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-member-accessibility': 'off',
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/no-inferrable-types': 'off',
'@typescript-eslint/no-magic-numbers': 'off',
'@typescript-eslint/no-namespace': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-type-alias': 'off',
'@typescript-eslint/no-require-imports': 'off',
'@typescript-eslint/no-object-literal-type-assertion': 'off',
'@typescript-eslint/prefer-interface': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-triple-slash-reference': 'off',
'@typescript-eslint/no-angle-bracket-type-assertion': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'complexity': 'off',
'@typescript-eslint/promise-function-async': 'off',
'@typescript-eslint/ban-ts-ignore': 'off',
'react/react-in-jsx-scope': 'off',
// Enabled rules
'@typescript-eslint/adjacent-overload-signatures': 'error',
'@typescript-eslint/array-type': 'error',
'@typescript-eslint/await-thenable': 'error',
'@typescript-eslint/class-name-casing': 'error',
// '@typescript-eslint/member-ordering': 'error',
'@typescript-eslint/no-unnecessary-type-assertion': 'error',
'@typescript-eslint/no-unused-vars': 'warn',
'@typescript-eslint/no-unnecessary-qualifier': 'error',
// '@typescript-eslint/no-parameter-properties': 'error',
'@typescript-eslint/no-misused-new': 'error',
'@typescript-eslint/no-for-in-array': 'error',
'@typescript-eslint/prefer-function-type': 'error',
// '@typescript-eslint/restrict-plus-operands': 'error',
'@typescript-eslint/type-annotation-spacing': 'error',
'@typescript-eslint/unified-signatures': 'error',
'max-depth': ['error', { max: 4 }],
'prefer-const': [
'error',
{
destructuring: 'all',
ignoreReadBeforeAssign: true,
},
],
},
settings: {
react: {
version: 'detect',
},
}
};