@eslinted/defaults 17.9.1 → 18.0.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_pattern/index.d.ts.map +1 -1
- package/dist/_pattern/index.js +1 -0
- package/dist/_pattern/index.js.map +1 -1
- package/dist/ignores/global.d.ts +2 -2
- package/dist/ignores/global.d.ts.map +1 -1
- package/dist/ignores/global.js +7 -4
- package/dist/ignores/global.js.map +1 -1
- package/dist/index.d.ts +247 -266
- package/dist/index.d.ts.map +1 -1
- package/dist/rules/css/index.d.ts +9 -9
- package/dist/rules/css/index.js +9 -9
- package/dist/rules/css/index.js.map +1 -1
- package/dist/rules/html/index.d.ts +42 -42
- package/dist/rules/html/index.d.ts.map +1 -1
- package/dist/rules/html/index.js +42 -42
- package/dist/rules/html/index.js.map +1 -1
- package/dist/rules/index.d.ts +247 -266
- package/dist/rules/index.d.ts.map +1 -1
- package/dist/rules/js.d.ts +112 -119
- package/dist/rules/js.d.ts.map +1 -1
- package/dist/rules/js.eslint.d.ts +45 -52
- package/dist/rules/js.eslint.d.ts.map +1 -1
- package/dist/rules/js.eslint.js +45 -52
- package/dist/rules/js.eslint.js.map +1 -1
- package/dist/rules/js.stylistic.d.ts +67 -67
- package/dist/rules/js.stylistic.d.ts.map +1 -1
- package/dist/rules/js.stylistic.js +67 -67
- package/dist/rules/js.stylistic.js.map +1 -1
- package/dist/rules/json/index.d.ts +8 -11
- package/dist/rules/json/index.d.ts.map +1 -1
- package/dist/rules/json/plugin/extend.d.ts +8 -11
- package/dist/rules/json/plugin/extend.d.ts.map +1 -1
- package/dist/rules/json/plugin/extend.js +8 -11
- package/dist/rules/json/plugin/extend.js.map +1 -1
- package/dist/rules/jsoncc/index.d.ts +1 -1
- package/dist/rules/jsoncc/index.js +1 -1
- package/dist/rules/mocha/index.d.ts +1 -1
- package/dist/rules/mocha/index.js +1 -1
- package/dist/rules/mocha/index.js.map +1 -1
- package/dist/rules/svelte/extend.d.ts +1 -1
- package/dist/rules/svelte/extend.js +1 -1
- package/dist/rules/svelte/extend.js.map +1 -1
- package/dist/rules/svelte/index.d.ts +24 -24
- package/dist/rules/svelte/svelte.d.ts +23 -23
- package/dist/rules/svelte/svelte.js +23 -23
- package/dist/rules/svelte/svelte.js.map +1 -1
- package/dist/rules/ts/extend.d.ts +4 -13
- package/dist/rules/ts/extend.d.ts.map +1 -1
- package/dist/rules/ts/extend.js +4 -13
- package/dist/rules/ts/extend.js.map +1 -1
- package/dist/rules/ts/index.d.ts +31 -41
- package/dist/rules/ts/index.d.ts.map +1 -1
- package/dist/rules/ts/ts.d.ts +27 -28
- package/dist/rules/ts/ts.d.ts.map +1 -1
- package/dist/rules/ts/ts.js +27 -28
- package/dist/rules/ts/ts.js.map +1 -1
- package/dist/rules/yml/extend.d.ts +7 -7
- package/dist/rules/yml/extend.js +7 -7
- package/dist/rules/yml/extend.js.map +1 -1
- package/dist/rules/yml/index.d.ts +19 -18
- package/dist/rules/yml/index.d.ts.map +1 -1
- package/dist/rules/yml/yml.d.ts +12 -11
- package/dist/rules/yml/yml.d.ts.map +1 -1
- package/dist/rules/yml/yml.js +12 -11
- package/dist/rules/yml/yml.js.map +1 -1
- package/package.json +1 -1
- package/src/_pattern/index.ts +1 -0
- package/src/ignores/global.ts +15 -6
- package/src/rules/css/index.ts +11 -11
- package/src/rules/html/index.ts +50 -58
- package/src/rules/js.eslint.ts +143 -162
- package/src/rules/js.stylistic.ts +87 -88
- package/src/rules/json/json.ts +3 -3
- package/src/rules/json/plugin/extend.ts +11 -14
- package/src/rules/json/plugin/index.ts +3 -3
- package/src/rules/jsonc/index.ts +1 -1
- package/src/rules/jsoncc/index.ts +2 -2
- package/src/rules/mocha/index.ts +1 -1
- package/src/rules/svelte/disable.ts +3 -3
- package/src/rules/svelte/extend.ts +3 -3
- package/src/rules/svelte/svelte.ts +26 -26
- package/src/rules/ts/disable.ts +4 -4
- package/src/rules/ts/extend.ts +7 -15
- package/src/rules/ts/ts.ts +44 -44
- package/src/rules/yml/extend.ts +7 -7
- package/src/rules/yml/yml.ts +15 -15
- package/tests/tsconfig.json +5 -0
- package/tsconfig-base.json +1 -3
package/src/rules/js.eslint.ts
CHANGED
|
@@ -8,118 +8,110 @@ export default {
|
|
|
8
8
|
"array-callback-return": [
|
|
9
9
|
State.ON,
|
|
10
10
|
{
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
allowVoid: true /* only works if checkForEach | @default: false */,
|
|
11
|
+
checkForEach: true,
|
|
12
|
+
allowVoid: true /* INFO: only works if checkForEach */,
|
|
14
13
|
},
|
|
15
14
|
],
|
|
16
|
-
"constructor-super": State.ON /* tsc */,
|
|
15
|
+
"constructor-super": State.ON /* @tsc */,
|
|
17
16
|
"for-direction": State.ON,
|
|
18
|
-
"getter-return": State.ON /* tsc */,
|
|
17
|
+
"getter-return": State.ON /* @tsc */,
|
|
19
18
|
"no-async-promise-executor": State.ON,
|
|
20
19
|
"no-await-in-loop": State.ON,
|
|
21
20
|
"no-class-assign": State.ON,
|
|
22
21
|
"no-compare-neg-zero": State.ON,
|
|
23
22
|
"no-cond-assign": State.ON,
|
|
24
|
-
"no-const-assign": State.ON /* tsc */,
|
|
23
|
+
"no-const-assign": State.ON /* @tsc */,
|
|
25
24
|
"no-constant-binary-expression": State.ON,
|
|
26
25
|
"no-constant-condition": [
|
|
27
26
|
State.ON,
|
|
28
27
|
{
|
|
29
|
-
checkLoops: "all"
|
|
28
|
+
checkLoops: "all",
|
|
30
29
|
},
|
|
31
30
|
] /* BUG: incorrect option description (claims "all" is ok): https://eslint.org/docs/latest/rules/no-constant-condition */,
|
|
32
31
|
"no-constructor-return": State.ON,
|
|
33
32
|
"no-control-regex": State.ON,
|
|
34
33
|
"no-debugger": State.ON,
|
|
35
|
-
"no-dupe-args": State.ON /* tsc */,
|
|
36
|
-
"no-dupe-class-members": State.ON /*
|
|
34
|
+
"no-dupe-args": State.ON /* @tsc */,
|
|
35
|
+
"no-dupe-class-members": State.ON /* supports TypeScript BUT @tsc */,
|
|
37
36
|
"no-dupe-else-if": State.ON,
|
|
38
|
-
"no-dupe-keys": State.ON /* tsc */,
|
|
37
|
+
"no-dupe-keys": State.ON /* @tsc */,
|
|
39
38
|
"no-duplicate-case": State.ON,
|
|
40
39
|
"no-duplicate-imports": [
|
|
41
40
|
State.ON,
|
|
42
41
|
{
|
|
43
|
-
includeExports: true
|
|
44
|
-
allowSeparateTypeImports: true
|
|
42
|
+
includeExports: true,
|
|
43
|
+
allowSeparateTypeImports: true,
|
|
45
44
|
},
|
|
46
45
|
],
|
|
47
46
|
"no-empty-character-class": State.ON,
|
|
48
47
|
"no-empty-pattern": State.ON,
|
|
49
48
|
"no-ex-assign": State.ON,
|
|
50
49
|
"no-fallthrough": State.ON,
|
|
51
|
-
"no-func-assign": State.ON /* tsc */,
|
|
52
|
-
"no-import-assign": State.ON /* tsc (
|
|
50
|
+
"no-func-assign": State.ON /* @tsc */,
|
|
51
|
+
"no-import-assign": State.ON /* @tsc: (-Object.assign) */,
|
|
53
52
|
"no-inner-declarations": [
|
|
54
53
|
State.ON,
|
|
55
|
-
"both"
|
|
54
|
+
"both",
|
|
56
55
|
],
|
|
57
56
|
"no-invalid-regexp": State.ON,
|
|
58
57
|
"no-irregular-whitespace": State.ON,
|
|
59
|
-
"no-loss-of-precision": State.ON /*
|
|
58
|
+
"no-loss-of-precision": State.ON /* supports TypeScript */,
|
|
60
59
|
"no-misleading-character-class": State.ON,
|
|
61
60
|
"no-new-native-nonconstructor": State.ON,
|
|
62
|
-
"no-obj-calls": State.ON /* tsc */,
|
|
61
|
+
"no-obj-calls": State.ON /* @tsc */,
|
|
63
62
|
"no-promise-executor-return": [
|
|
64
63
|
State.ON,
|
|
65
64
|
{
|
|
66
|
-
allowVoid: true
|
|
65
|
+
allowVoid: true,
|
|
67
66
|
},
|
|
68
67
|
],
|
|
69
68
|
"no-prototype-builtins": State.ON,
|
|
70
69
|
"no-self-assign": State.ON,
|
|
71
70
|
"no-self-compare": State.ON,
|
|
72
|
-
"no-setter-return": State.ON /* tsc */,
|
|
71
|
+
"no-setter-return": State.ON /* @tsc */,
|
|
73
72
|
"no-sparse-arrays": State.ON,
|
|
74
73
|
"no-template-curly-in-string": State.ON,
|
|
75
|
-
"no-this-before-super": State.ON /* tsc */,
|
|
74
|
+
"no-this-before-super": State.ON /* @tsc */,
|
|
76
75
|
"no-unassigned-vars": State.ON,
|
|
77
|
-
"no-undef": State.ON /* tsc */,
|
|
76
|
+
"no-undef": State.ON /* @tsc */,
|
|
78
77
|
"no-unexpected-multiline": State.ON,
|
|
79
78
|
"no-unmodified-loop-condition": State.ON,
|
|
80
|
-
"no-unreachable": State.
|
|
81
|
-
"no-unreachable-loop": State.
|
|
79
|
+
"no-unreachable": State.WARN /* @tsc */,
|
|
80
|
+
"no-unreachable-loop": State.WARN,
|
|
82
81
|
"no-unsafe-finally": State.ON,
|
|
83
82
|
"no-unsafe-negation": [
|
|
84
83
|
State.ON,
|
|
85
84
|
{
|
|
86
|
-
enforceForOrderingRelations: true
|
|
85
|
+
enforceForOrderingRelations: true,
|
|
87
86
|
},
|
|
88
|
-
] /* tsc */,
|
|
87
|
+
] /* @tsc */,
|
|
89
88
|
"no-unsafe-optional-chaining": [
|
|
90
89
|
State.ON,
|
|
91
90
|
{
|
|
92
|
-
disallowArithmeticOperators: true
|
|
91
|
+
disallowArithmeticOperators: true,
|
|
93
92
|
},
|
|
94
93
|
],
|
|
95
|
-
"no-unused-private-class-members": State.
|
|
96
|
-
"no-unused-vars": State.
|
|
94
|
+
"no-unused-private-class-members": State.WARN,
|
|
95
|
+
"no-unused-vars": State.WARN /* TSLint */,
|
|
97
96
|
"no-use-before-define": [
|
|
98
97
|
State.ON,
|
|
99
98
|
{
|
|
100
|
-
|
|
101
|
-
// classes: true,
|
|
102
|
-
// variables: true,
|
|
103
|
-
// allowNamedExports: false,
|
|
104
|
-
// enums: true,
|
|
105
|
-
typedefs: false /* changed 14.2.2 (still questionable) */,
|
|
106
|
-
// ignoreTypeReferences: true,
|
|
99
|
+
typedefs: false,
|
|
107
100
|
},
|
|
108
|
-
] /*
|
|
101
|
+
] /* supports TypeScript */,
|
|
109
102
|
"no-useless-assignment": State.ON,
|
|
110
103
|
"no-useless-backreference": State.ON,
|
|
111
104
|
"require-atomic-updates": State.ON,
|
|
112
105
|
"use-isnan": [
|
|
113
106
|
State.ON,
|
|
114
107
|
{
|
|
115
|
-
|
|
116
|
-
enforceForIndexOf: true /* @default false */,
|
|
108
|
+
enforceForIndexOf: true,
|
|
117
109
|
},
|
|
118
110
|
],
|
|
119
111
|
"valid-typeof": [
|
|
120
112
|
State.ON,
|
|
121
113
|
{
|
|
122
|
-
requireStringLiterals: true
|
|
114
|
+
requireStringLiterals: true,
|
|
123
115
|
},
|
|
124
116
|
],
|
|
125
117
|
// #endregion
|
|
@@ -129,67 +121,64 @@ export default {
|
|
|
129
121
|
"accessor-pairs": [
|
|
130
122
|
State.ON,
|
|
131
123
|
{
|
|
132
|
-
|
|
133
|
-
// getWithoutSet: false,
|
|
134
|
-
// enforceForClassMembers: true,
|
|
135
|
-
enforceForTSTypes: true /* @default false */,
|
|
124
|
+
enforceForTSTypes: true,
|
|
136
125
|
},
|
|
137
126
|
],
|
|
138
|
-
"arrow-body-style": State.
|
|
127
|
+
"arrow-body-style": State.WARN,
|
|
139
128
|
"block-scoped-var": State.ON,
|
|
140
|
-
// camelcase: State.OFF
|
|
141
|
-
// "capitalized-comments": State.OFF
|
|
142
|
-
// "class-methods-use-this": State.OFF /*
|
|
143
|
-
// complexity: State.OFF
|
|
144
|
-
"consistent-return": State.ON /* tsc
|
|
129
|
+
// camelcase: State.OFF,
|
|
130
|
+
// "capitalized-comments": State.OFF,
|
|
131
|
+
// "class-methods-use-this": State.OFF /* supports TypeScript */,
|
|
132
|
+
// complexity: State.OFF,
|
|
133
|
+
"consistent-return": State.ON /* @tsc: noImplicitReturns */,
|
|
145
134
|
"consistent-this": State.ON,
|
|
146
135
|
curly: [
|
|
147
|
-
State.
|
|
148
|
-
"multi"
|
|
136
|
+
State.WARN,
|
|
137
|
+
"multi",
|
|
149
138
|
],
|
|
150
|
-
// "default-case": State.OFF /* preference: don't care */,
|
|
139
|
+
// "default-case": State.OFF /* @preference: don't care */,
|
|
151
140
|
"default-case-last": State.ON,
|
|
152
|
-
"default-param-last": State.ON /*
|
|
153
|
-
"dot-notation": State.
|
|
141
|
+
"default-param-last": State.ON /* supports TypeScript */,
|
|
142
|
+
"dot-notation": State.WARN /* TSLint */,
|
|
154
143
|
eqeqeq: State.ON,
|
|
155
|
-
// "func-name-matching": State.OFF
|
|
156
|
-
// "func-names": State.OFF
|
|
157
|
-
// "func-style": State.OFF /*
|
|
158
|
-
// "grouped-accessor-pairs": State.OFF /*
|
|
159
|
-
// "guard-for-in": State.OFF /* preference
|
|
160
|
-
// "id-denylist": State.OFF
|
|
161
|
-
// "id-length": State.OFF
|
|
162
|
-
// "id-match": State.OFF
|
|
163
|
-
"init-declarations": State.
|
|
144
|
+
// "func-name-matching": State.OFF,
|
|
145
|
+
// "func-names": State.OFF,
|
|
146
|
+
// "func-style": State.OFF /* supports TypeScript */,
|
|
147
|
+
// "grouped-accessor-pairs": State.OFF /* BUG: requires adjacency, not as described in documentation */,
|
|
148
|
+
// "guard-for-in": State.OFF /* @preference: not helpful because using for-in on non-literal objects is bad practice and this rule doesn't guard against that anyway, while adding a pointless check to known object literals */,
|
|
149
|
+
// "id-denylist": State.OFF,
|
|
150
|
+
// "id-length": State.OFF,
|
|
151
|
+
// "id-match": State.OFF,
|
|
152
|
+
"init-declarations": State.WARN /* supports TypeScript */,
|
|
164
153
|
"logical-assignment-operators": [
|
|
165
|
-
State.
|
|
166
|
-
"always"
|
|
154
|
+
State.WARN,
|
|
155
|
+
"always",
|
|
167
156
|
{
|
|
168
|
-
enforceForIfStatements: true
|
|
157
|
+
enforceForIfStatements: true,
|
|
169
158
|
},
|
|
170
159
|
],
|
|
171
|
-
// "max-classes-per-file": State.OFF
|
|
172
|
-
// "max-depth": State.OFF
|
|
173
|
-
// "max-lines": State.OFF
|
|
174
|
-
// "max-lines-per-function": State.OFF
|
|
175
|
-
// "max-nested-callbacks": State.OFF
|
|
176
|
-
// "max-params": State.OFF /*
|
|
177
|
-
// "max-statements": State.OFF
|
|
178
|
-
// "multiline-comment-style": State.OFF
|
|
179
|
-
// "new-cap": State.OFF /*
|
|
160
|
+
// "max-classes-per-file": State.OFF,
|
|
161
|
+
// "max-depth": State.OFF,
|
|
162
|
+
// "max-lines": State.OFF,
|
|
163
|
+
// "max-lines-per-function": State.OFF,
|
|
164
|
+
// "max-nested-callbacks": State.OFF,
|
|
165
|
+
// "max-params": State.OFF /* supports TypeScript */,
|
|
166
|
+
// "max-statements": State.OFF,
|
|
167
|
+
// "multiline-comment-style": State.OFF,
|
|
168
|
+
// "new-cap": State.OFF /* @CONFLICT: breaks Scriptable */,
|
|
180
169
|
"no-alert": State.ON,
|
|
181
|
-
"no-array-constructor": State.ON /*
|
|
170
|
+
"no-array-constructor": State.ON /* supports TypeScript */,
|
|
182
171
|
"no-bitwise": State.ON,
|
|
183
172
|
"no-caller": State.ON,
|
|
184
173
|
"no-case-declarations": State.ON,
|
|
185
|
-
// "no-console": State.OFF /*
|
|
174
|
+
// "no-console": State.OFF /* @CONFLICT: breaks Node.js console applications and Scriptable, and otherwise unnecessarily hampers browser test code */,
|
|
186
175
|
"no-continue": State.ON,
|
|
187
176
|
"no-delete-var": State.ON,
|
|
188
177
|
"no-div-regex": State.ON,
|
|
189
|
-
|
|
178
|
+
"no-else-return": State.ON,
|
|
190
179
|
"no-empty": State.ON,
|
|
191
180
|
"no-empty-function": [
|
|
192
|
-
State.
|
|
181
|
+
State.WARN,
|
|
193
182
|
{
|
|
194
183
|
allow: [
|
|
195
184
|
"constructors",
|
|
@@ -197,42 +186,42 @@ export default {
|
|
|
197
186
|
"protectedConstructors",
|
|
198
187
|
"decoratedFunctions",
|
|
199
188
|
"overrideMethods",
|
|
200
|
-
]
|
|
189
|
+
],
|
|
201
190
|
},
|
|
202
|
-
] /*
|
|
203
|
-
"no-empty-static-block": State.
|
|
191
|
+
] /* supports TypeScript */,
|
|
192
|
+
"no-empty-static-block": State.WARN,
|
|
204
193
|
"no-eq-null": State.ON,
|
|
205
194
|
"no-eval": State.ON,
|
|
206
195
|
"no-extend-native": State.ON,
|
|
207
196
|
"no-extra-bind": State.ON,
|
|
208
197
|
"no-extra-boolean-cast": [
|
|
209
|
-
State.
|
|
198
|
+
State.WARN,
|
|
210
199
|
{
|
|
211
|
-
enforceForLogicalOperands: true
|
|
200
|
+
enforceForLogicalOperands: true,
|
|
212
201
|
},
|
|
213
202
|
],
|
|
214
|
-
"no-extra-label": State.
|
|
203
|
+
"no-extra-label": State.WARN,
|
|
215
204
|
"no-global-assign": State.ON,
|
|
216
205
|
"no-implicit-coercion": State.ON,
|
|
217
|
-
// "no-implicit-globals": State.OFF /*
|
|
206
|
+
// "no-implicit-globals": State.OFF /* @CONFLICT: breaks Scriptable? breaks Sveltekit? */,
|
|
218
207
|
"no-implied-eval": State.ON /* TSLint */,
|
|
219
|
-
// "no-inline-comments": State.OFF
|
|
208
|
+
// "no-inline-comments": State.OFF,
|
|
220
209
|
"no-invalid-this": [
|
|
221
210
|
State.ON,
|
|
222
211
|
{
|
|
223
|
-
capIsConstructor: false
|
|
212
|
+
capIsConstructor: false,
|
|
224
213
|
},
|
|
225
|
-
] /*
|
|
214
|
+
] /* supports TypeScript BUT @tsc: strict, noImplicitThis */,
|
|
226
215
|
"no-iterator": State.ON,
|
|
227
|
-
"no-label-var": State.
|
|
216
|
+
"no-label-var": State.WARN,
|
|
228
217
|
"no-lone-blocks": State.ON,
|
|
229
|
-
// "no-lonely-if": State.OFF
|
|
230
|
-
"no-loop-func": State.ON /*
|
|
231
|
-
// "no-magic-numbers": State.OFF /*
|
|
218
|
+
// "no-lonely-if": State.OFF,
|
|
219
|
+
"no-loop-func": State.ON /* supports TypeScript */,
|
|
220
|
+
// "no-magic-numbers": State.OFF /* supports TypeScript BUT @CONFLICT: breaks TypeScript number literals, even with most liberal exceptions */,
|
|
232
221
|
"no-multi-assign": State.ON,
|
|
233
|
-
"no-multi-str": State.
|
|
234
|
-
// "no-negated-condition": State.OFF
|
|
235
|
-
// "no-nested-ternary": State.OFF
|
|
222
|
+
"no-multi-str": State.WARN,
|
|
223
|
+
// "no-negated-condition": State.OFF,
|
|
224
|
+
// "no-nested-ternary": State.OFF,
|
|
236
225
|
"no-new": State.ON,
|
|
237
226
|
"no-new-func": State.ON,
|
|
238
227
|
"no-new-wrappers": State.ON,
|
|
@@ -244,61 +233,61 @@ export default {
|
|
|
244
233
|
"no-plusplus": [
|
|
245
234
|
State.ON,
|
|
246
235
|
{
|
|
247
|
-
allowForLoopAfterthoughts: true
|
|
236
|
+
allowForLoopAfterthoughts: true,
|
|
248
237
|
},
|
|
249
238
|
],
|
|
250
239
|
"no-proto": State.ON,
|
|
251
|
-
// "no-redeclare": State.OFF /* tsc
|
|
252
|
-
// "no-regex-spaces": State.OFF
|
|
253
|
-
// "no-restricted-exports": State.OFF
|
|
254
|
-
// "no-restricted-globals": State.OFF /*
|
|
255
|
-
// "no-restricted-imports": State.OFF /*
|
|
256
|
-
// "no-restricted-properties": State.OFF
|
|
257
|
-
// "no-restricted-syntax": State.OFF
|
|
258
|
-
// "no-return-assign": State.OFF
|
|
240
|
+
// "no-redeclare": State.OFF /* @tsc: (let, const, -var) */,
|
|
241
|
+
// "no-regex-spaces": State.OFF,
|
|
242
|
+
// "no-restricted-exports": State.OFF,
|
|
243
|
+
// "no-restricted-globals": State.OFF /* supports TypeScript */,
|
|
244
|
+
// "no-restricted-imports": State.OFF /* TSLint */,
|
|
245
|
+
// "no-restricted-properties": State.OFF,
|
|
246
|
+
// "no-restricted-syntax": State.OFF,
|
|
247
|
+
// "no-return-assign": State.OFF,
|
|
259
248
|
"no-script-url": State.ON,
|
|
260
249
|
"no-sequences": State.ON,
|
|
261
|
-
// "no-shadow": State.OFF /*
|
|
250
|
+
// "no-shadow": State.OFF /* supports TypeScript */,
|
|
262
251
|
"no-shadow-restricted-names": State.ON,
|
|
263
|
-
// "no-ternary": State.OFF
|
|
264
|
-
"no-throw-literal": State.
|
|
252
|
+
// "no-ternary": State.OFF,
|
|
253
|
+
"no-throw-literal": State.WARN /* TSLint */,
|
|
265
254
|
"no-undef-init": State.ON,
|
|
266
|
-
// "no-undefined": State.OFF /*
|
|
267
|
-
// "no-underscore-dangle": State.OFF
|
|
268
|
-
"no-unneeded-ternary": State.
|
|
255
|
+
// "no-undefined": State.OFF /* @CONFLICT: breaks Scriptable? breaks Sveltekit? */,
|
|
256
|
+
// "no-underscore-dangle": State.OFF,
|
|
257
|
+
"no-unneeded-ternary": State.WARN,
|
|
269
258
|
"no-unused-expressions": [
|
|
270
|
-
State.
|
|
259
|
+
State.WARN,
|
|
271
260
|
{
|
|
272
|
-
allowShortCircuit: true
|
|
273
|
-
allowTernary: true
|
|
261
|
+
allowShortCircuit: true,
|
|
262
|
+
allowTernary: true,
|
|
274
263
|
},
|
|
275
|
-
] /*
|
|
276
|
-
"no-unused-labels": State.
|
|
277
|
-
"no-useless-call": State.
|
|
278
|
-
"no-useless-catch": State.
|
|
279
|
-
"no-useless-computed-key": State.
|
|
280
|
-
"no-useless-concat": State.
|
|
281
|
-
"no-useless-constructor": State.
|
|
264
|
+
] /* supports TypeScript */,
|
|
265
|
+
"no-unused-labels": State.WARN,
|
|
266
|
+
"no-useless-call": State.WARN,
|
|
267
|
+
"no-useless-catch": State.WARN,
|
|
268
|
+
"no-useless-computed-key": State.WARN,
|
|
269
|
+
"no-useless-concat": State.WARN,
|
|
270
|
+
"no-useless-constructor": State.WARN /* supports TypeScript */,
|
|
282
271
|
"no-useless-escape": [
|
|
283
|
-
State.
|
|
272
|
+
State.WARN,
|
|
284
273
|
{
|
|
285
|
-
allowRegexCharacters: ["-"]
|
|
274
|
+
allowRegexCharacters: ["-"],
|
|
286
275
|
},
|
|
287
276
|
],
|
|
288
|
-
"no-useless-rename": State.
|
|
289
|
-
"no-useless-return": State.
|
|
290
|
-
"no-var": State.
|
|
277
|
+
"no-useless-rename": State.WARN,
|
|
278
|
+
"no-useless-return": State.WARN,
|
|
279
|
+
"no-var": State.WARN /* supports TypeScript */,
|
|
291
280
|
"no-void": [
|
|
292
281
|
State.ON,
|
|
293
282
|
{
|
|
294
|
-
allowAsStatement: true
|
|
283
|
+
allowAsStatement: true,
|
|
295
284
|
},
|
|
296
285
|
],
|
|
297
|
-
// "no-warning-comments": State.OFF
|
|
286
|
+
// "no-warning-comments": State.OFF,
|
|
298
287
|
"no-with": State.ON,
|
|
299
|
-
"object-shorthand": State.
|
|
288
|
+
"object-shorthand": State.WARN,
|
|
300
289
|
"one-var": [
|
|
301
|
-
State.
|
|
290
|
+
State.WARN,
|
|
302
291
|
{
|
|
303
292
|
"var": "consecutive",
|
|
304
293
|
let: "consecutive",
|
|
@@ -308,38 +297,30 @@ export default {
|
|
|
308
297
|
separateRequires: true,
|
|
309
298
|
},
|
|
310
299
|
],
|
|
311
|
-
"operator-assignment": State.
|
|
312
|
-
"prefer-arrow-callback": State.
|
|
300
|
+
"operator-assignment": State.WARN,
|
|
301
|
+
"prefer-arrow-callback": State.WARN /* supports TypeScript */,
|
|
313
302
|
"prefer-const": [
|
|
314
|
-
State.
|
|
303
|
+
State.WARN,
|
|
315
304
|
{
|
|
316
|
-
destructuring: "all"
|
|
305
|
+
destructuring: "all",
|
|
317
306
|
},
|
|
318
307
|
],
|
|
319
|
-
"prefer-destructuring":
|
|
320
|
-
|
|
321
|
-
{
|
|
322
|
-
AssignmentExpression: {
|
|
323
|
-
array: false /* @default true */,
|
|
324
|
-
object: false /* @default true */,
|
|
325
|
-
},
|
|
326
|
-
},
|
|
327
|
-
] /* TSLint */,
|
|
328
|
-
"prefer-exponentiation-operator": State.ON,
|
|
308
|
+
// "prefer-destructuring": State.OFF /* TSLint BUT @preference: too prescriptive */,
|
|
309
|
+
"prefer-exponentiation-operator": State.WARN,
|
|
329
310
|
// "prefer-named-capture-group": State.OFF,
|
|
330
|
-
"prefer-numeric-literals": State.
|
|
331
|
-
"prefer-object-has-own": State.
|
|
332
|
-
"prefer-object-spread": State.
|
|
333
|
-
"prefer-promise-reject-errors": State.
|
|
311
|
+
"prefer-numeric-literals": State.WARN,
|
|
312
|
+
"prefer-object-has-own": State.WARN,
|
|
313
|
+
"prefer-object-spread": State.WARN,
|
|
314
|
+
"prefer-promise-reject-errors": State.WARN,
|
|
334
315
|
"prefer-regex-literals": [
|
|
335
|
-
State.
|
|
316
|
+
State.WARN,
|
|
336
317
|
{
|
|
337
|
-
disallowRedundantWrapping: true
|
|
318
|
+
disallowRedundantWrapping: true,
|
|
338
319
|
},
|
|
339
320
|
] /* TSLint */,
|
|
340
|
-
"prefer-rest-params": State.
|
|
341
|
-
"prefer-spread": State.
|
|
342
|
-
// "prefer-template": State.OFF /*
|
|
321
|
+
"prefer-rest-params": State.WARN,
|
|
322
|
+
"prefer-spread": State.WARN,
|
|
323
|
+
// "prefer-template": State.OFF /* @CONFLICT: performance */,
|
|
343
324
|
"preserve-caught-error": [
|
|
344
325
|
State.ON,
|
|
345
326
|
{
|
|
@@ -348,23 +329,23 @@ export default {
|
|
|
348
329
|
],
|
|
349
330
|
radix: [
|
|
350
331
|
State.ON,
|
|
351
|
-
"as-needed"
|
|
332
|
+
"as-needed",
|
|
352
333
|
],
|
|
353
334
|
"require-await": State.ON /* TSLint */,
|
|
354
335
|
"require-unicode-regexp": State.ON,
|
|
355
336
|
"require-yield": State.ON,
|
|
356
|
-
// "sort-imports": State.OFF
|
|
357
|
-
// "sort-keys": State.OFF
|
|
358
|
-
// "sort-vars": State.OFF
|
|
359
|
-
// strict: State.OFF
|
|
360
|
-
// "symbol-description": State.OFF
|
|
361
|
-
"vars-on-top": State.
|
|
362
|
-
yoda: State.
|
|
337
|
+
// "sort-imports": State.OFF,
|
|
338
|
+
// "sort-keys": State.OFF,
|
|
339
|
+
// "sort-vars": State.OFF,
|
|
340
|
+
// strict: State.OFF,
|
|
341
|
+
// "symbol-description": State.OFF,
|
|
342
|
+
"vars-on-top": State.WARN,
|
|
343
|
+
yoda: State.WARN,
|
|
363
344
|
// #endregion
|
|
364
345
|
|
|
365
346
|
// #region FORMATTING
|
|
366
347
|
// [ https://eslint.org/docs/latest/rules/#layout--formatting ]
|
|
367
|
-
|
|
348
|
+
"unicode-bom": State.WARN,
|
|
368
349
|
// #endregion
|
|
369
350
|
} as const,
|
|
370
351
|
};
|