This repository has been archived by the owner on Nov 9, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc
87 lines (84 loc) · 2.25 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
{
root: true,
parser: "babel-eslint",
parserOptions: {
ecmaVersion: 6,
sourceType: "module",
ecmaFeatures: {
jsx: true
},
},
env: {
browser: true,
commonjs: true,
es6: true,
webextensions: true,
node: true,
},
extends: "eslint:recommended",
rules: {
// modification of default rules
"comma-dangle": [1, "always-multiline"],
"no-console": [0],
// all block must have {..}
"curly": [2],
"dot-location": [2, "property"],
"dot-notation": [2],
"eqeqeq": [1, "smart"],
"no-eval": [2],
"no-extend-native": [2],
"no-implied-eval": [2],
"no-multi-spaces": [1],
"radix": [2],
"strict": [2, "global"],
"no-unused-vars": [2, {"args": "none"}],
"no-useless-escape": [1],
// style
"array-bracket-spacing": [2],
"block-spacing": [2, "never"],
"brace-style": [2, "1tbs", {"allowSingleLine": true}],
"camelcase": [2, {"properties": "never"}],
"comma-spacing": [2, {"before": false, "after": true}],
"comma-style": [2, "last"],
"computed-property-spacing": [2, "never"],
"eol-last": [2],
"indent": [2, "tab", {"SwitchCase": 1}],
"key-spacing": [2, {"beforeColon": false, "afterColon": true, "mode": "minimum"}],
"new-cap": [2],
"lines-around-comment": [2],
"no-lonely-if": [2],
"no-trailing-spaces": [2, {"skipBlankLines": true}],
"quotes": [2, "single", "avoid-escape"],
"semi": [2],
"keyword-spacing": [2, {
"overrides": {
"if": {"after": false},
"else": {"before": false, "after": false},
"try": {"after": false},
"catch": {"before": false, "after": false},
"for": {"after": false},
"switch": {"after": false},
"function": {"before": false, "after": false},
},
}],
"space-before-blocks": [2, "never"],
"space-before-function-paren": [2, "never"],
"space-in-parens": [2, "never"],
"space-infix-ops": [2],
"array-callback-return": [1],
"no-unmodified-loop-condition": [2],
"no-whitespace-before-property": [2],
// es6
"arrow-spacing": [2],
"no-class-assign": [2],
"no-dupe-class-members": [2],
"no-var": [1],
"prefer-arrow-callback": [1, {"allowNamedFunctions": true}],
"prefer-spread": [2],
"prefer-rest-params": [2],
"no-confusing-arrow": [2],
"no-new-symbol": [2],
"no-useless-constructor": [1],
"no-duplicate-imports": [1],
},
}