-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc
88 lines (80 loc) · 2.46 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
{
"root": true,
"env": {
"browser": true,
"worker": true,
"commonjs": true,
"amd": true
},
"parserOptions": {
"ecmaVersion": 3
},
"rules": {
////////// Errors //////////
"no-const-assign": 2,
"require-yield": 2,
"no-unexpected-multiline": 2,
"no-shadow-restricted-names": 2,
"comma-dangle": 2, // array length IE bug
"no-catch-shadow": 2,
"wrap-iife": [2, "any"],
"no-with": 2,
"no-extra-boolean-cast": 2,
"no-else-return": 2,
"no-lonely-if": 2,
"no-unreachable": 2,
"no-dupe-args": 2,
"no-dupe-keys": 2,
"no-duplicate-case": 2,
"no-extra-semi": 2,
"no-obj-calls": 2,
"no-useless-call": 2,
"no-useless-concat": 2,
"no-useless-computed-key": 2,
"no-useless-escape": 2,
"no-native-reassign": [2, {"exceptions": ["JSON", "isNaN"]}],
"no-redeclare": 2,
"no-invalid-regexp": 2,
"no-sparse-arrays": 2,
"yoda": 2,
"brace-style": [2, "1tbs", { "allowSingleLine": true }],
"no-spaced-func": 2,
"space-before-function-paren": [2, { "anonymous": "always", "named": "never" }],
"space-before-blocks": 2,
"keyword-spacing": [2, { "after": true }],
"switch-colon-spacing": 2,
"no-empty": [2, { "allowEmptyCatch": true }],
"for-direction": 2,
"quote-props": [2, "consistent"],
"no-console": [2, { "allow": ["info", "warn", "error", "exception"] }],
////////// Warnings //////////
"no-return-await": 1,
"no-throw-literal": 1,
"no-mixed-spaces-and-tabs": [1, "smart-tabs"],
"comma-spacing": 1,
"no-constant-condition": 1,
"no-unneeded-ternary": 1,
"no-extra-bind": 1,
"no-extra-parens": [1, "all", {
"returnAssign": false,
"enforceForNewInMemberExpressions": false
}],
"no-return-assign": 1,
"no-ex-assign": 1,
"no-func-assign": 1,
"no-inner-declarations": 1,
"no-irregular-whitespace": 1,
"dot-location": [1, "property"],
"no-empty-character-class": 1,
"no-regex-spaces": 1,
"padding-line-between-statements": [1, { "blankLine": "always", "prev": ["const", "let", "var"], "next": "*"}],
"computed-property-spacing": 1,
"no-negated-condition": 1,
"new-cap": [1, { "capIsNew": false }],
"operator-assignment": [1, "always"],
"no-trailing-spaces": [1, { "skipBlankLines": true }],
"max-params": [1, 4],
"func-names": [1, "never"], // https://kangax.github.io/nfe/
"quotes": [1, "single", { "avoidEscape": true }]
}
}