-
-
Notifications
You must be signed in to change notification settings - Fork 178
/
.eslintrc.js
77 lines (76 loc) · 1.8 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
const { version } = require('react');
module.exports = {
env: {
browser: true,
es6: true
},
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:jsx-a11y/recommended'
],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly'
},
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true
},
ecmaVersion: 2018,
sourceType: 'module'
},
plugins: ['react', '@typescript-eslint', 'import', 'jsx-a11y'],
rules: {
'@typescript-eslint/no-unused-vars': 'warn',
'no-unused-vars': 'off',
'import/extensions': [2, 'never'],
'import/first': 2,
'import/newline-after-import': 1,
'import/no-duplicates': 2,
'import/no-self-import': 2,
'import/no-unresolved': [2],
'import/no-useless-path-segments': 2,
'import/order': [
'warn',
{
alphabetize: {
order: 'asc'
},
'newlines-between': 'always'
}
],
complexity: [2, { max: 8 }],
'max-params': [1, { max: 4 }],
'no-console': 2,
'no-else-return': 1,
'no-implicit-globals': 2,
'no-lonely-if': 2,
'no-multi-spaces': 1,
'no-prototype-builtins': 0,
'no-trailing-spaces': [2, { ignoreComments: false }],
'no-undef': 2,
'no-unneeded-ternary': 2,
'no-useless-catch': 2,
'no-useless-computed-key': 2,
'no-useless-return': 2,
'no-var': 2,
'no-warning-comments': 1,
'object-shorthand': [2, 'always', { avoidQuotes: true }],
'prefer-const': 2
},
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx']
},
'import/resolver': {
typescript: true
},
react: {
version: 'detect'
}
}
};