-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.eslintrc.json
180 lines (174 loc) · 6 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
{
"env": {
"es6": true,
"browser": true,
"mocha": true,
"worker": true
},
"parserOptions": {
"ecmaVersion": 2018,
"ecmaFeatures": {
"jsx": true
}
},
"plugins": [
"compat",
"es",
"no-unsanitized",
"optimize-regex",
"sonarjs",
"unicorn"
],
"extends": [
"eslint:recommended",
"plugin:es/restrict-to-es2018",
"plugin:no-unsanitized/DOM",
"plugin:sonarjs/recommended"
],
"rules": {
"array-callback-return": 2,
"block-scoped-var": 2,
"brace-style": [2, "stroustrup"],
"comma-style": [2, "last"],
"complexity": [2, 23],
"consistent-this": [2, "self"],
"consistent-return": 0,
"curly": [2, "all"],
"default-param-last": 2,
"dot-notation": 2,
"eol-last": 2,
"eqeqeq": [2, "smart"],
"for-direction": 2,
"func-call-spacing": [2, "never"],
"guard-for-in": 1,
"id-length": [2, {"min": 1, "max": 29}],
"keyword-spacing": [2, {}],
"linebreak-style": 2,
"max-classes-per-file": [1, 4],
"max-depth": [2, 5],
"max-len": [2, 120],
"max-params": [2, 7],
"no-alert": 2,
"no-caller": 2,
"no-console": 0,
"no-constant-condition": [2, { "checkLoops": false }],
"no-constructor-return": 2,
"no-dupe-else-if": 2,
"no-else-return": 2,
"no-empty-function": [2, { "allow": ["constructors"] }],
"no-eq-null": 2,
"no-eval": 2,
"no-extend-native": 2,
"no-extra-bind": 2,
"no-extra-parens": [1, "all", {"conditionalAssign": false}],
"no-floating-decimal": 2,
"no-global-assign": 2,
"no-implicit-coercion": [2, { "allow": ["!!", "+"] } ],
"no-implied-eval": 2,
"no-import-assign": 2,
"no-invalid-this": 0,
"no-irregular-whitespace": 2,
"no-lone-blocks": 2,
"no-lonely-if": 2,
"no-loop-func": 2,
"no-loss-of-precision": 1,
"no-mixed-spaces-and-tabs": 2,
"no-multi-str": 2,
"no-negated-condition": 2,
"no-new": 2,
"no-new-func": 2,
"no-new-wrappers": 2,
"no-prototype-builtins": 0,
"no-restricted-properties": [2, {"property": "innerHTML"}, {"property": "outerHTML"}],
"no-return-assign": 2,
"no-return-await": 2,
"no-script-url": 2,
"no-self-compare": 2,
"no-sequences": 2,
"no-setter-return": 2,
"no-shadow-restricted-names": 2,
"no-trailing-spaces": 2,
"no-throw-literal": 2,
"no-undef": 0,
"no-undef-init": 2,
"no-unmodified-loop-condition": 2,
"no-unneeded-ternary": 2,
"no-unused-expressions": 2,
"no-unused-vars": [2, {"vars": "local", "args": "after-used"}],
"no-useless-call": 2,
"no-useless-computed-key": [2, { "enforceForClassMembers": true }],
"no-useless-concat": 2,
"no-useless-constructor": 2,
"no-useless-return": 2,
"no-use-before-define": [2, {"functions": false}],
"no-void": 2,
"no-with": 2,
"no-whitespace-before-property": 2,
"one-var": [2, {"initialized": "never"}],
"operator-assignment": 2,
"prefer-arrow-callback": [2, { "allowNamedFunctions": true }],
"prefer-const": [2, {"destructuring": "all"}],
"prefer-destructuring": [1, {"object": true, "array": false}],
"prefer-numeric-literals": 2,
"prefer-regex-literals": 1,
"prefer-rest-params": 1,
"prefer-spread": 1,
"prefer-template": 1,
"rest-spread-spacing": 2,
"semi": [2, "always"],
"space-before-function-paren": [2, "never"],
"space-in-parens": [2, "never"],
"space-infix-ops": 2,
"space-unary-ops": [2, {"words": false, "nonwords": false}],
"spaced-comment": [2, "always"],
"strict": [2, "function"],
"switch-colon-spacing": 2,
"unicode-bom": 2,
"valid-jsdoc": 1,
"wrap-iife": [2, "inside", {"functionPrototypeMethods": true}],
"yoda": [2, "never"],
"indent": [2, 4, {
"SwitchCase": 1,
"outerIIFEBody": "off",
"FunctionDeclaration": {"parameters": "first"},
"FunctionExpression": {"parameters": "first"},
"CallExpression": {"arguments": "first"},
"ArrayExpression": "first",
"ObjectExpression": "first",
"ignoredNodes": ["JSXElement"]
}],
// ESLint plugins configuration follows
"compat/compat": 1,
"es/no-atomics": 2,
"es/no-exponential-operators": 2,
"es/no-promise-all-settled": "off",
"es/no-regexp-lookbehind-assertions": 2,
"es/no-regexp-named-capture-groups": 2,
"es/no-regexp-s-flag": 2,
"es/no-regexp-unicode-property-escapes": 2,
"es/no-trailing-function-commas": 2,
"optimize-regex/optimize-regex": 2,
"sonarjs/cognitive-complexity": [1, 48],
"sonarjs/no-duplicate-string": [1, { "threshold": 6 }],
"unicorn/catch-error-name": [2, {"name": "ex"}],
"unicorn/consistent-destructuring": 1,
"unicorn/consistent-function-scoping": 1,
"unicorn/error-message": 2,
"unicorn/no-abusive-eslint-disable": 2,
"unicorn/no-instanceof-array": 2,
"unicorn/no-this-assignment": 2,
"unicorn/no-unsafe-regex": 2,
"unicorn/prefer-date-now": 2,
"unicorn/prefer-default-parameters": 1,
"unicorn/prefer-dom-node-dataset": 2,
"unicorn/prefer-includes": 1,
"unicorn/prefer-keyboard-event-key": 1,
"unicorn/prefer-modern-dom-apis": 1,
"unicorn/prefer-negative-index": 2,
"unicorn/prefer-set-has": 1,
"unicorn/prefer-spread": 1,
"unicorn/prefer-starts-ends-with": 2,
"unicorn/prefer-ternary": 1,
"unicorn/regex-shorthand": 2
}
}