-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy path.eslintrc.js
65 lines (65 loc) · 1.85 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
module.exports = {
env: {
browser: true,
es6: true,
},
extends: 'airbnb',
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
},
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 2018,
sourceType: 'module',
},
plugins: [
'react',
'@typescript-eslint',
],
settings: {
'import/resolver': {
typescript: {},
},
},
rules: {
indent: ['error', 4],
'react/jsx-indent': ['error', 4],
'react/jsx-indent-props': ['error', 4],
'react/prop-types': [0],
'react/no-array-index-key': [0],
'react/forbid-prop-types': [0],
'react/no-danger': [0],
'react/require-default-props': [0],
'no-shadow': [0],
// [Deprecated], https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/label-has-for.md
'jsx-a11y/label-has-for': [0],
'jsx-a11y/label-has-associated-control': [2, { assert: 'either' }],
'react/jsx-props-no-spreading': [0],
'react/jsx-fragments': ['error', 'element'],
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': ['error'],
'import/extensions': [
'error',
'ignorePackages',
{
js: 'never',
mjs: 'never',
jsx: 'never',
ts: 'never',
tsx: 'never',
},
],
'max-len': ['error', 120, 2, {
ignoreUrls: true,
ignoreComments: false,
ignoreRegExpLiterals: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
}],
'react/jsx-filename-extension': [1, { extensions: ['.jsx', '.tsx'] }],
},
};