-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
84 lines (81 loc) · 2.49 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
75
76
77
78
79
80
81
82
83
84
module.exports = {
"env": {
"browser": true,
"commonjs": true,
"es6": true
},
"extends": [
"eslint:recommended",
],
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "script",
},
"plugins": [],
"rules": {
// Possible Errors
"no-console": "off",
"no-template-curly-in-string": "error",
"no-unsafe-negation": "error",
// Best Practices
"array-callback-return": "error",
"consistent-return": "error",
"curly": "error",
"guard-for-in": "error",
"no-alert": "error",
"no-caller": "error",
"no-eval": "error",
"no-extra-bind": "error",
"no-extend-native": "error",
"no-extra-label": "error",
"no-global-assign": "error",
"no-implicit-globals": "error",
"no-implied-eval": "error",
"no-iterator": "error",
"no-multi-spaces": "error",
"no-new-func": "error",
"no-new-wrappers": "error",
"no-proto": "error",
"no-self-compare": "error",
"no-sequences": "error",
"no-shadow-restricted-names": "error",
"no-throw-literal": "error",
"no-useless-concat": "error",
"no-useless-escape": "error",
"no-with": "error",
"strict": ["error", "safe"],
"wrap-iife": ["error", "any"],
// Stylistic
"block-spacing": "error",
"brace-style": ["error", "1tbs", { "allowSingleLine": true }],
"comma-spacing": ["error", { "before": false, "after": true }],
"computed-property-spacing": ["error", "never"],
"eol-last": "error",
"func-call-spacing": ["error", "never"],
"indent": ["error", 2, { SwitchCase: 1 }],
"jsx-quotes": ["error", "prefer-double"],
"keyword-spacing": "error",
// TODO this is ok from CLI, but not in Sublime (opposite result!)
// "linebreak-style": ["error", "windows"],
"no-array-constructor": "error",
"no-lonely-if": "error",
"no-trailing-spaces": "off",
"no-unneeded-ternary": "error",
"no-whitespace-before-property": "error",
"quotes": ["error", "single"],
"semi": ["error", "always"],
"semi-spacing": ["error", {"before": false, "after": true}],
"space-before-blocks": "error",
"space-in-parens": ["error", "never"],
// TODO es6 default params not supported :(
"space-infix-ops": "off",
"space-unary-ops": ["error", { "words": true, "nonwords": false }],
// ES6
"no-useless-rename": "error",
"prefer-const": "error",
"prefer-rest-params": "error",
"prefer-spread": "error",
"prefer-template": "error",
"rest-spread-spacing": ["error", "never"],
}
};