-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.eslintrc.js
55 lines (54 loc) · 1.45 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
const config = {
env: {
es6: true
},
parser: 'babel-eslint',
plugins: [
'react',
'prettier',
'package-json',
'react-hooks',
'eslint-plugin-prettier'
],
extends: [
'eslint:recommended',
'prettier',
'plugin:package-json/recommended',
'plugin:prettier/recommended'
],
rules: {
'prettier/prettier': [
'error',
{
endOfLine: 'auto',
singleQuote: true,
tabWidth: 4,
trailingComma: 'none'
}
],
'prefer-const': 'error',
'no-console': 'off',
'no-unused-vars': 'error',
'react/jsx-uses-vars': 'error',
'react/jsx-uses-react': 'error',
'react-hooks/exhaustive-deps': 'error',
'react-hooks/rules-of-hooks': 'error',
'no-duplicate-imports': 'error',
'one-var': ['error', 'never'],
'no-prototype-builtins': 'off',
'no-undef': 'off',
'no-useless-escape': 'off',
'react/jsx-no-literals': [
'error',
{
allowedStrings: ['Submit'],
// Use ignoreProps: false to catch label/title/alt text, etc.
// Has the downside of erroring on "id" and other string props.
ignoreProps: true,
noStrings: true
}
]
},
overrides: []
};
module.exports = config;