-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
59 lines (55 loc) · 1.3 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
module.exports = {
parser: '@babel/eslint-parser',
extends: ['standard', 'standard-react', 'prettier'],
env: {
browser: true,
es6: true,
jest: true
},
settings: {
react: {
version: '17.0.1'
}
},
globals: {
before: true,
cy: true,
Cypress: true,
localStorage: true
},
plugins: ['react', 'react-hooks', 'prettier'],
parserOptions: {
ecmaVersion: 6,
sourceType: 'module',
ecmaFeatures: {
jsx: true
}
},
rules: {
'prettier/prettier': [
1,
{ printWidth: 100, semi: false, singleQuote: true, trailingComma: 'none' }
],
'max-len': [
'error',
{
// Ignore SVGs d=
ignorePattern: 'd="([\\s\\S]*?)"|data:image|^export [^,]+ from',
code: 100,
tabWidth: 2
}
],
// Next JS does not require react import
'react/react-in-jsx-scope': 'off',
// Make sure imports are taken care off
'react/jsx-uses-react': 'error',
'react/jsx-uses-vars': 'error',
// don't force es6 functions to include space before paren
'space-before-function-paren': 0,
'react/prop-types': 0,
// allow specifying true explicitly for boolean props
'react/jsx-boolean-value': 0,
'react-hooks/rules-of-hooks': 'error',
'react/no-did-update-set-state': 0
}
}