-
Notifications
You must be signed in to change notification settings - Fork 3
/
.eslintrc.js
74 lines (72 loc) · 1.95 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
module.exports = {
root: true,
ignorePatterns: ['*.css', 'node_modules/'],
parser: 'babel-eslint',
parserOptions: {
sourceType: 'module',
ecmaVersion: 2019,
jsx: true
},
env: {
jest: true,
browser: true,
node: true,
es6: true
},
plugins: ['prettier', 'import'],
extends: [
'eslint:recommended',
'plugin:import/recommended',
'plugin:react/recommended'
],
settings: {
react: {
version: '16.4.1' // React version. "detect" automatically picks the version you have installed.
},
'import/ignore': ['node_modules', '.json$']
},
rules: {
'prettier/prettier': ['error'],
camelcase: ['error'],
curly: ['error', 'all'],
'dot-notation': ['error'],
eqeqeq: ['error'],
'handle-callback-err': ['error'],
'new-cap': ['error'],
'no-alert': ['error'],
'no-caller': ['error'],
'no-eval': ['error'],
'no-labels': ['error'],
'no-lonely-if': ['error'],
'no-new': ['error'],
'no-proto': ['error'],
'no-return-assign': ['error'],
'no-self-compare': ['error'],
'no-shadow': ['error'],
'no-shadow-restricted-names': ['error'],
'no-useless-call': ['error'],
'no-var': ['error'],
'no-void': ['error'],
'no-warning-comments': ['error'],
'no-with': ['error'],
radix: ['error'],
'spaced-comment': ['error', 'always'],
strict: ['error', 'global'],
yoda: ['error', 'never'],
// Import rules
// Search way how integrate with `lerna`
'import/no-unresolved': 'off',
'import/imports-first': ['error'],
'import/newline-after-import': ['error'],
'import/no-duplicates': ['error'],
'import/no-mutable-exports': ['error'],
'import/no-named-as-default': ['error'],
'import/no-named-as-default-member': ['error'],
'import/order': ['off'],
'import/prefer-default-export': ['error'],
// React
// Need enable in future
'react/prop-types': ['off'],
'react/display-name': ['off']
}
}