-
Notifications
You must be signed in to change notification settings - Fork 3.1k
/
.eslintrc.json
80 lines (79 loc) · 2.43 KB
/
.eslintrc.json
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
{
"parserOptions": {
"ecmaVersion": 6
},
"env": {
"browser": false,
"node": true,
"es6": true
},
"extends": "eslint:recommended",
"parser": "babel-eslint",
"rules": {
// eslint Error
"new-parens": "error",
"no-lonely-if": "error",
"no-multi-assign": "error",
"no-undef": "error",
"curly": "error",
"dot-notation": "error",
"no-alert": "error",
"no-else-return": "error",
"no-empty-function": "error",
"no-eq-null": "error",
"no-eval": "error",
"no-floating-decimal": "error",
"no-loop-func": "error",
"no-param-reassign": "error",
"no-return-assign": "error",
"no-self-compare": "error",
"no-whitespace-before-property": "error",
// eslint Warn
"eqeqeq": "warn",
"no-extra-parens": "warn",
"complexity": ["warn", 10],
"no-multi-spaces": "warn",
"no-multi-str": "warn",
"no-unused-expressions": "warn",
"no-useless-concat": "warn",
"no-constant-condition": "error",
"yoda": "warn",
"callback-return": "error",
"global-require": "error",
"brace-style": ["warn", "allman", {"allowSingleLine": true}],
"camelcase": "warn",
"comma-dangle": ["warn", "never"],
"func-call-spacing": "warn",
"indent": ["warn", 3, {"SwitchCase": 1}],
"key-spacing": "warn",
"keyword-spacing": "warn",
"linebreak-style": "warn",
"max-depth": ["warn", 4],
"max-len": ["warn", 400],
"max-nested-callbacks": ["warn", 5],
"max-params": ["warn", 5],
"max-statements-per-line": ["warn", {"max": 2}],
"no-trailing-spaces": "warn",
"object-property-newline": "warn",
"operator-linebreak": ["warn", "after"],
"padded-blocks": ["warn", "never"],
"quotes": ["warn", "double", {"allowTemplateLiterals": true}],
"semi": "warn",
"semi-spacing": "warn",
"space-before-blocks": ["warn", "always"],
"space-in-parens": "warn",
"wrap-regex": "warn",
"prefer-const": "warn",
"template-curly-spacing": "warn",
"no-mixed-spaces-and-tabs": "warn",
"no-extra-semi": "warn",
"no-prototype-builtins": "warn",
"no-unreachable": "warn",
// eslint Off
"no-unused-vars": "off",
"block-scoped-var": "off",
"no-useless-return": "off",
"no-console": "off",
"no-dupe-keys": "off"
}
}