-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc
88 lines (81 loc) · 2.21 KB
/
.eslintrc
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
{
"extends": ["standard"],
"env": {
"browser": true,
"node": true,
"mocha": true
},
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 6,
"ecmaFeatures": {
"jsx": true
},
"sourceType": "module"
},
"rules": {
"react/no-multi-comp": 0,
"react/prefer-stateless-function": 0,
"import/default": 0,
"import/no-duplicates": 0,
"import/named": 0,
"import/namespace": 0,
"import/no-unresolved": 0,
"import/no-named-as-default": 2,
"no-console": 0,
"no-alert": 0,
"strict": 0,
"arrow-body-style": [2, "as-needed"],
"no-confusing-arrow": "off",
"global-require": "off",
// keep it simple
"semi": ["error", "never"],
"standard/object-curly-even-spacing": [2, "either"],
"standard/array-bracket-even-spacing": [2, "either"],
"standard/computed-property-even-spacing": [2, "even"],
// indentation
"indent": [ 2, 2 ],
"newline-per-chained-call": [ "error", { "ignoreChainWithDepth": 3 }],
// spacing
"space-in-parens": [ 2, "always" ],
"template-curly-spacing": [ 2, "always" ],
"array-bracket-spacing": [ 2, "always" ],
"object-curly-spacing": [ 2, "always" ],
"computed-property-spacing": [ 2, "always" ],
"no-multi-spaces": [2, {"exceptions": {"ImportDeclaration": true}}],
// strings
"quotes": [ 2, "single", "avoid-escape" ],
// code arrangement matter
"no-use-before-define": [ 2, { "functions": false } ],
"no-param-reassign" : 0,
"no-underscore-dangle": [1, { "allow": ["_id"] }],
"no-unused-vars": 0,
# "no-unused-vars-rest/no-unused-vars": [2, {"ignoreDestructuredVarsWithRest": true}],
// make it meaningful
"prefer-const": 1,
// comma
"comma-dangle": ["error", "always-multiline"]
},
"plugins": [
"react",
"import",
"standard",
"promise",
"no-unused-vars-rest"
],
"settings": {
"import/parser": "babel-eslint",
"import/resolve": {
"moduleDirectory": ["node_modules", "src"]
}
},
"globals": {
"__DEVELOPMENT__": true,
"__CLIENT__": true,
"__SERVER__": true,
"__DISABLE_SSR__": true,
"__DEVTOOLS__": true,
"socket": true,
"webpackIsomorphicTools": true
}
}