-
Notifications
You must be signed in to change notification settings - Fork 55
/
.eslintrc
49 lines (41 loc) · 1.27 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
{
"env": {
"browser": true,
"es6": true,
"node": true,
"mocha": true
},
"extends": "airbnb",
"parser": "babel-eslint",
"rules": {
// indentation
"indent": [ 2, 4 ],
// spacing
"template-curly-spacing": [ 2, "always" ],
"array-bracket-spacing": [ 2, "always" ],
"object-curly-spacing": [ 2, "always" ],
"computed-property-spacing": [ 2, "always" ],
"no-multiple-empty-lines": [ 2, { "max": 1, "maxEOF": 0, "maxBOF": 0 } ],
// strings
"quotes": [ 2, "double", "avoid-escape" ],
// code arrangement matter
"no-use-before-define": [ 2, { "functions": false } ],
// make it meaningful
"prefer-const": 1,
// keep it simple
"complexity": [ 1, 5 ],
// Consisten return
"consistent-return": 0,
"import/no-extraneous-dependencies": ["error", {"devDependencies": ["**/*.test.js", "**/*.spec.js", "**/compile.js", "**/test/*.js"]}],
// react
"react/prefer-es6-class": 0,
"react/jsx-filename-extension": 0,
"react/jsx-indent": [ 2, 4 ]
},
"globals": {
"artifacts": true,
"web3": true,
"contract": true,
"assert": true
}
}