-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
51 lines (49 loc) · 1.4 KB
/
index.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
module.exports = {
"extends": ["airbnb", "plugin:jsx-control-statements/recommended"],
"parser": "babel-eslint",
"plugins": [
"react",
"jsx-a11y",
"import",
"jsx-control-statements"
],
"settings": {
"import/resolver": {
"webpack": {
"config": "config/webpack.config.js"
}
}
},
"rules":{
// indentation
"indent": [ 2, 2 ],
// spacing
"no-multiple-empty-lines": [ 2, { "max": 1, "maxEOF": 0, "maxBOF": 0 } ],
// strings
"quotes": [ 2, "double", "avoid-escape" ],
// code arrangement matters
"no-use-before-define": [ 2, { "functions": false } ],
// make it meaningful
"prefer-const": 1,
// keep it simple
"complexity": [ 1, 10 ],
"comma-dangle": [2, "only-multiline"],
"no-unused-vars": [2, { "args": "none" }],
"no-console": [1, { "allow": ["warn", "error"] }],
"no-restricted-syntax": [2, "WithStatement"],
//import
"import/prefer-default-export":[1],
"import/no-extraneous-dependencies": [2, {"devDependencies": true, "optionalDependencies": false, "peerDependencies": false}],
// react
"react/jsx-curly-spacing": [ 2, "always" ],
"react/jsx-indent": [ 2, 2 ],
"react/jsx-no-undef": [2, { "allowGlobals": true }],
"react/jsx-boolean-value": [1, "always"],
"react/forbid-prop-types":[1]
},
"globals": {
"document": true,
"window": true,
"navigator": true
}
}