@eslinted/defaults 20.4.0 → 21.0.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.
Files changed (100) hide show
  1. package/dist/index.d.ts +48 -67
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/rules/css/index.d.ts +1 -1
  4. package/dist/rules/css/index.d.ts.map +1 -1
  5. package/dist/rules/css/index.js +15 -17
  6. package/dist/rules/css/index.js.map +1 -1
  7. package/dist/rules/html/index.d.ts +1 -1
  8. package/dist/rules/html/index.d.ts.map +1 -1
  9. package/dist/rules/html/index.js +39 -41
  10. package/dist/rules/html/index.js.map +1 -1
  11. package/dist/rules/index.d.ts +48 -67
  12. package/dist/rules/index.d.ts.map +1 -1
  13. package/dist/rules/js.d.ts +219 -221
  14. package/dist/rules/js.d.ts.map +1 -1
  15. package/dist/rules/js.js +545 -7
  16. package/dist/rules/js.js.map +1 -1
  17. package/dist/rules/json/index.d.ts +15 -17
  18. package/dist/rules/json/index.d.ts.map +1 -1
  19. package/dist/rules/json/index.js +29 -7
  20. package/dist/rules/json/index.js.map +1 -1
  21. package/dist/rules/jsonc/index.d.ts +1 -1
  22. package/dist/rules/jsonc/index.d.ts.map +1 -1
  23. package/dist/rules/jsonc/index.js +8 -10
  24. package/dist/rules/jsonc/index.js.map +1 -1
  25. package/dist/rules/svelte/index.d.ts +75 -81
  26. package/dist/rules/svelte/index.d.ts.map +1 -1
  27. package/dist/rules/svelte/index.js +103 -9
  28. package/dist/rules/svelte/index.js.map +1 -1
  29. package/dist/rules/ts/index.d.ts +135 -140
  30. package/dist/rules/ts/index.d.ts.map +1 -1
  31. package/dist/rules/ts/index.js +235 -9
  32. package/dist/rules/ts/index.js.map +1 -1
  33. package/dist/rules/yml/index.d.ts +1 -1
  34. package/dist/rules/yml/index.d.ts.map +1 -1
  35. package/dist/rules/yml/index.js +30 -32
  36. package/dist/rules/yml/index.js.map +1 -1
  37. package/package.json +1 -1
  38. package/src/rules/css/index.ts +18 -20
  39. package/src/rules/html/index.ts +72 -74
  40. package/src/rules/js.ts +621 -6
  41. package/src/rules/json/index.ts +68 -6
  42. package/src/rules/jsonc/index.ts +9 -11
  43. package/src/rules/svelte/index.ts +163 -11
  44. package/src/rules/ts/index.ts +275 -9
  45. package/src/rules/yml/index.ts +52 -54
  46. package/dist/rules/js.eslint.d.ts +0 -289
  47. package/dist/rules/js.eslint.d.ts.map +0 -1
  48. package/dist/rules/js.eslint.js +0 -285
  49. package/dist/rules/js.eslint.js.map +0 -1
  50. package/dist/rules/js.stylistic.d.ts +0 -271
  51. package/dist/rules/js.stylistic.d.ts.map +0 -1
  52. package/dist/rules/js.stylistic.js +0 -265
  53. package/dist/rules/js.stylistic.js.map +0 -1
  54. package/dist/rules/json/json.d.ts +0 -9
  55. package/dist/rules/json/json.d.ts.map +0 -1
  56. package/dist/rules/json/json.js +0 -7
  57. package/dist/rules/json/json.js.map +0 -1
  58. package/dist/rules/json/jsonc.d.ts +0 -29
  59. package/dist/rules/json/jsonc.d.ts.map +0 -1
  60. package/dist/rules/json/jsonc.js +0 -27
  61. package/dist/rules/json/jsonc.js.map +0 -1
  62. package/dist/rules/svelte/disable.d.ts +0 -17
  63. package/dist/rules/svelte/disable.d.ts.map +0 -1
  64. package/dist/rules/svelte/disable.js +0 -15
  65. package/dist/rules/svelte/disable.js.map +0 -1
  66. package/dist/rules/svelte/extend.d.ts +0 -13
  67. package/dist/rules/svelte/extend.d.ts.map +0 -1
  68. package/dist/rules/svelte/extend.js +0 -11
  69. package/dist/rules/svelte/extend.js.map +0 -1
  70. package/dist/rules/svelte/html.d.ts +0 -14
  71. package/dist/rules/svelte/html.d.ts.map +0 -1
  72. package/dist/rules/svelte/html.js +0 -12
  73. package/dist/rules/svelte/html.js.map +0 -1
  74. package/dist/rules/svelte/svelte.d.ts +0 -94
  75. package/dist/rules/svelte/svelte.d.ts.map +0 -1
  76. package/dist/rules/svelte/svelte.js +0 -88
  77. package/dist/rules/svelte/svelte.js.map +0 -1
  78. package/dist/rules/ts/disable.d.ts +0 -26
  79. package/dist/rules/ts/disable.d.ts.map +0 -1
  80. package/dist/rules/ts/disable.js +0 -24
  81. package/dist/rules/ts/disable.js.map +0 -1
  82. package/dist/rules/ts/extend.d.ts +0 -38
  83. package/dist/rules/ts/extend.d.ts.map +0 -1
  84. package/dist/rules/ts/extend.js +0 -36
  85. package/dist/rules/ts/extend.js.map +0 -1
  86. package/dist/rules/ts/ts.d.ts +0 -187
  87. package/dist/rules/ts/ts.d.ts.map +0 -1
  88. package/dist/rules/ts/ts.js +0 -185
  89. package/dist/rules/ts/ts.js.map +0 -1
  90. package/src/rules/js.eslint.ts +0 -348
  91. package/src/rules/js.stylistic.ts +0 -279
  92. package/src/rules/json/json.ts +0 -13
  93. package/src/rules/json/jsonc.ts +0 -63
  94. package/src/rules/svelte/disable.ts +0 -21
  95. package/src/rules/svelte/extend.ts +0 -14
  96. package/src/rules/svelte/html.ts +0 -14
  97. package/src/rules/svelte/svelte.ts +0 -126
  98. package/src/rules/ts/disable.ts +0 -26
  99. package/src/rules/ts/extend.ts +0 -42
  100. package/src/rules/ts/ts.ts +0 -210
@@ -1,185 +0,0 @@
1
- export default {
2
- rules: {
3
- "ts/await-thenable": 2,
4
- "ts/ban-ts-comment": 1,
5
- "ts/ban-tslint-comment": 1,
6
- "ts/class-literal-property-style": 1,
7
- "ts/consistent-generic-constructors": 1,
8
- "ts/consistent-type-assertions": [
9
- 1,
10
- {
11
- arrayLiteralTypeAssertions: "never",
12
- objectLiteralTypeAssertions: "never",
13
- },
14
- ],
15
- "ts/consistent-type-exports": 1,
16
- "ts/consistent-type-imports": 1,
17
- "ts/explicit-member-accessibility": [
18
- 1,
19
- {
20
- overrides: {
21
- constructors: "no-public",
22
- },
23
- },
24
- ],
25
- "ts/member-ordering": [
26
- 1,
27
- {
28
- "default": {
29
- optionalityOrder: "required-first",
30
- },
31
- },
32
- ],
33
- "ts/method-signature-style": 1,
34
- "ts/no-array-delete": 2,
35
- "ts/no-base-to-string": 2,
36
- "ts/no-confusing-non-null-assertion": 2,
37
- "ts/no-confusing-void-expression": 2,
38
- "ts/no-duplicate-enum-values": 2,
39
- "ts/no-duplicate-type-constituents": 2,
40
- "ts/no-dynamic-delete": 2,
41
- "ts/no-empty-object-type": 2,
42
- "ts/no-explicit-any": [
43
- 2,
44
- {
45
- fixToUnknown: true,
46
- },
47
- ],
48
- "ts/no-extra-non-null-assertion": 2,
49
- "ts/no-extraneous-class": [
50
- 2,
51
- {
52
- allowEmpty: true,
53
- },
54
- ],
55
- "ts/no-floating-promises": [
56
- 2,
57
- {
58
- checkThenables: true,
59
- },
60
- ],
61
- "ts/no-for-in-array": 2,
62
- "ts/no-import-type-side-effects": 2,
63
- "ts/no-inferrable-types": 2,
64
- "ts/no-meaningless-void-operator": [
65
- 2,
66
- {
67
- checkNever: true,
68
- },
69
- ],
70
- "ts/no-misused-new": 2,
71
- "ts/no-misused-promises": 2,
72
- "ts/no-misused-spread": 2,
73
- "ts/no-mixed-enums": 2,
74
- "ts/no-namespace": 2,
75
- "ts/no-non-null-asserted-nullish-coalescing": 2,
76
- "ts/no-non-null-asserted-optional-chain": 2,
77
- "ts/no-redundant-type-constituents": 2,
78
- "ts/no-require-imports": 2,
79
- "ts/no-this-alias": 2,
80
- "ts/no-unnecessary-boolean-literal-compare": 2,
81
- "ts/no-unnecessary-condition": 2,
82
- "ts/no-unnecessary-parameter-property-assignment": 2,
83
- "ts/no-unnecessary-qualifier": 2,
84
- "ts/no-unnecessary-template-expression": 2,
85
- "ts/no-unnecessary-type-arguments": 2,
86
- "ts/no-unnecessary-type-assertion": 2,
87
- "ts/no-unnecessary-type-constraint": 2,
88
- "ts/no-unnecessary-type-conversion": 2,
89
- "ts/no-unsafe-argument": 2,
90
- "ts/no-unsafe-assignment": 2,
91
- "ts/no-unsafe-call": 2,
92
- "ts/no-unsafe-declaration-merging": 2,
93
- "ts/no-unsafe-function-type": 2,
94
- "ts/no-unsafe-member-access": [
95
- 2,
96
- {
97
- allowOptionalChaining: true,
98
- },
99
- ],
100
- "ts/no-unsafe-return": 2,
101
- "ts/no-unsafe-unary-minus": 2,
102
- "ts/no-unused-private-class-members": 1,
103
- "ts/no-useless-default-assignment": 1,
104
- "ts/no-useless-empty-export": 1,
105
- "ts/no-wrapper-object-types": 2,
106
- "ts/parameter-properties": [
107
- 1,
108
- {
109
- prefer: "parameter-property",
110
- },
111
- ],
112
- "ts/prefer-as-const": 1,
113
- "ts/prefer-find": 1,
114
- "ts/prefer-for-of": 1,
115
- "ts/prefer-function-type": 1,
116
- "ts/prefer-includes": 1,
117
- "ts/prefer-namespace-keyword": 1,
118
- "ts/prefer-nullish-coalescing": [
119
- 1,
120
- {
121
- ignoreMixedLogicalExpressions: true,
122
- ignorePrimitives: true,
123
- },
124
- ],
125
- "ts/prefer-optional-chain": [
126
- 1,
127
- {
128
- checkBigInt: false,
129
- checkBoolean: false,
130
- checkNumber: false,
131
- checkString: false,
132
- },
133
- ],
134
- "ts/prefer-readonly": 1,
135
- "ts/prefer-reduce-type-parameter": 1,
136
- "ts/prefer-regexp-exec": 1,
137
- "ts/prefer-return-this-type": 1,
138
- "ts/prefer-string-starts-ends-with": 1,
139
- "ts/promise-function-async": 2,
140
- "ts/require-array-sort-compare": 1,
141
- "ts/restrict-plus-operands": [
142
- 2,
143
- {
144
- allowAny: false,
145
- allowBoolean: false,
146
- allowNullish: false,
147
- allowRegExp: false,
148
- },
149
- ],
150
- "ts/restrict-template-expressions": [
151
- 2,
152
- {
153
- allowAny: false,
154
- allowNullish: false,
155
- allowRegExp: false,
156
- },
157
- ],
158
- "ts/return-await": 2,
159
- "ts/strict-boolean-expressions": [
160
- 2,
161
- {
162
- allowNullableBoolean: true,
163
- allowNullableEnum: true,
164
- allowNullableNumber: true,
165
- allowNullableString: true,
166
- },
167
- ],
168
- "ts/strict-void-return": 2,
169
- "ts/switch-exhaustiveness-check": [
170
- 2,
171
- {
172
- requireDefaultForNonUnion: true,
173
- considerDefaultExhaustiveForUnions: true,
174
- },
175
- ],
176
- "ts/unbound-method": [
177
- 2,
178
- {
179
- ignoreStatic: true,
180
- },
181
- ],
182
- "ts/use-unknown-in-catch-callback-variable": 2,
183
- },
184
- };
185
- //# sourceMappingURL=ts.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ts.js","sourceRoot":"","sources":["../../../src/rules/ts/ts.ts"],"names":[],"mappings":"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"}
@@ -1,348 +0,0 @@
1
- import { State } from "./state";
2
-
3
- // DOC: https://eslint.org/docs/latest/rules/
4
- export default {
5
- rules: {
6
- // #region PROBLEMS
7
- // DOC: https://eslint.org/docs/latest/rules/#possible-problems
8
- "array-callback-return": [
9
- State.ON,
10
- {
11
- checkForEach: true,
12
- allowVoid: true /* INFO: only works if checkForEach */,
13
- },
14
- ],
15
- "constructor-super": State.ON /* @tsc */,
16
- "for-direction": State.ON,
17
- "getter-return": State.ON /* @tsc */,
18
- "no-async-promise-executor": State.ON,
19
- "no-await-in-loop": State.ON,
20
- "no-class-assign": State.ON,
21
- "no-compare-neg-zero": State.ON,
22
- "no-cond-assign": State.ON,
23
- "no-const-assign": State.ON /* @tsc */,
24
- "no-constant-binary-expression": State.ON,
25
- "no-constant-condition": [
26
- State.ON,
27
- {
28
- checkLoops: "all",
29
- },
30
- ] /* BUG: incorrect option description (claims "all" is ok): https://eslint.org/docs/latest/rules/no-constant-condition */,
31
- "no-constructor-return": State.ON,
32
- "no-control-regex": State.ON,
33
- "no-debugger": State.ON,
34
- "no-dupe-args": State.ON /* @tsc */,
35
- "no-dupe-class-members": State.ON /* supports TypeScript BUT @tsc */,
36
- "no-dupe-else-if": State.ON,
37
- "no-dupe-keys": State.ON /* @tsc */,
38
- "no-duplicate-case": State.ON,
39
- "no-duplicate-imports": [
40
- State.ON,
41
- {
42
- includeExports: true,
43
- allowSeparateTypeImports: true,
44
- },
45
- ],
46
- "no-empty-character-class": State.ON,
47
- "no-empty-pattern": State.ON,
48
- "no-ex-assign": State.ON,
49
- "no-fallthrough": State.ON,
50
- "no-func-assign": State.ON /* @tsc */,
51
- "no-import-assign": State.ON /* @tsc: (-Object.assign) */,
52
- "no-inner-declarations": [
53
- State.ON,
54
- "both",
55
- ],
56
- "no-invalid-regexp": State.ON,
57
- "no-irregular-whitespace": State.ON,
58
- "no-loss-of-precision": State.ON /* supports TypeScript */,
59
- "no-misleading-character-class": State.ON,
60
- "no-new-native-nonconstructor": State.ON,
61
- "no-obj-calls": State.ON /* @tsc */,
62
- "no-promise-executor-return": [
63
- State.ON,
64
- {
65
- allowVoid: true,
66
- },
67
- ],
68
- "no-prototype-builtins": State.ON,
69
- "no-self-assign": State.ON,
70
- "no-self-compare": State.ON,
71
- "no-setter-return": State.ON /* @tsc */,
72
- "no-sparse-arrays": State.ON,
73
- "no-template-curly-in-string": State.ON,
74
- "no-this-before-super": State.ON /* @tsc */,
75
- "no-unassigned-vars": State.ON,
76
- "no-undef": State.ON /* @tsc */,
77
- "no-unexpected-multiline": State.ON,
78
- "no-unmodified-loop-condition": State.ON,
79
- "no-unreachable": State.WARN /* @tsc */,
80
- "no-unreachable-loop": State.WARN,
81
- "no-unsafe-finally": State.ON,
82
- "no-unsafe-negation": [
83
- State.ON,
84
- {
85
- enforceForOrderingRelations: true,
86
- },
87
- ] /* @tsc */,
88
- "no-unsafe-optional-chaining": [
89
- State.ON,
90
- {
91
- disallowArithmeticOperators: true,
92
- },
93
- ],
94
- "no-unused-private-class-members": State.WARN,
95
- "no-unused-vars": State.WARN /* TSLint */,
96
- "no-use-before-define": [
97
- State.ON,
98
- {
99
- typedefs: false,
100
- },
101
- ] /* supports TypeScript */,
102
- "no-useless-assignment": State.ON,
103
- "no-useless-backreference": State.ON,
104
- "require-atomic-updates": State.ON,
105
- "use-isnan": [
106
- State.ON,
107
- {
108
- enforceForIndexOf: true,
109
- },
110
- ],
111
- "valid-typeof": [
112
- State.ON,
113
- {
114
- requireStringLiterals: true,
115
- },
116
- ],
117
- // #endregion
118
-
119
- // #region SUGGESTIONS
120
- // [ https://eslint.org/docs/latest/rules/#suggestions ]
121
- "accessor-pairs": [
122
- State.ON,
123
- {
124
- enforceForTSTypes: true,
125
- },
126
- ],
127
- "arrow-body-style": State.WARN,
128
- "block-scoped-var": State.ON,
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 */,
134
- "consistent-this": State.ON,
135
- curly: [
136
- State.WARN,
137
- "multi",
138
- ],
139
- // "default-case": State.OFF /* @preference: don't care */,
140
- "default-case-last": State.ON,
141
- "default-param-last": State.ON /* supports TypeScript */,
142
- "dot-notation": State.WARN /* TSLint */,
143
- eqeqeq: State.ON,
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 */,
153
- "logical-assignment-operators": [
154
- State.WARN,
155
- "always",
156
- {
157
- enforceForIfStatements: true,
158
- },
159
- ],
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 */,
169
- "no-alert": State.ON,
170
- "no-array-constructor": State.ON /* supports TypeScript */,
171
- "no-bitwise": State.ON,
172
- "no-caller": State.ON,
173
- "no-case-declarations": State.ON,
174
- // "no-console": State.OFF /* @CONFLICT: breaks Node.js console applications and Scriptable, and otherwise unnecessarily hampers browser test code */,
175
- "no-continue": State.ON,
176
- "no-delete-var": State.ON,
177
- "no-div-regex": State.ON,
178
- "no-else-return": State.ON,
179
- "no-empty": State.ON,
180
- "no-empty-function": [
181
- State.WARN,
182
- {
183
- allow: [
184
- "constructors",
185
- "privateConstructors",
186
- "protectedConstructors",
187
- "decoratedFunctions",
188
- "overrideMethods",
189
- ],
190
- },
191
- ] /* supports TypeScript */,
192
- "no-empty-static-block": State.WARN,
193
- "no-eq-null": State.ON,
194
- "no-eval": State.ON,
195
- "no-extend-native": State.ON,
196
- "no-extra-bind": State.ON,
197
- "no-extra-boolean-cast": [
198
- State.WARN,
199
- {
200
- enforceForLogicalOperands: true,
201
- },
202
- ],
203
- "no-extra-label": State.WARN,
204
- "no-global-assign": State.ON,
205
- "no-implicit-coercion": State.ON,
206
- // "no-implicit-globals": State.OFF /* @CONFLICT: breaks Scriptable? breaks Sveltekit? */,
207
- "no-implied-eval": State.ON /* TSLint */,
208
- // "no-inline-comments": State.OFF,
209
- "no-invalid-this": [
210
- State.ON,
211
- {
212
- capIsConstructor: false,
213
- },
214
- ] /* supports TypeScript BUT @tsc: strict, noImplicitThis */,
215
- "no-iterator": State.ON,
216
- "no-label-var": State.WARN,
217
- "no-lone-blocks": State.ON,
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 */,
221
- "no-multi-assign": State.ON,
222
- "no-multi-str": State.WARN,
223
- // "no-negated-condition": State.OFF,
224
- // "no-nested-ternary": State.OFF,
225
- "no-new": State.ON,
226
- "no-new-func": State.ON,
227
- "no-new-wrappers": State.ON,
228
- "no-nonoctal-decimal-escape": State.ON,
229
- "no-object-constructor": State.ON,
230
- "no-octal": State.ON,
231
- "no-octal-escape": State.ON,
232
- "no-param-reassign": State.ON,
233
- "no-plusplus": [
234
- State.ON,
235
- {
236
- allowForLoopAfterthoughts: true,
237
- },
238
- ],
239
- "no-proto": State.ON,
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,
248
- "no-script-url": State.ON,
249
- "no-sequences": State.ON,
250
- // "no-shadow": State.OFF /* supports TypeScript */,
251
- "no-shadow-restricted-names": State.ON,
252
- // "no-ternary": State.OFF,
253
- "no-throw-literal": State.WARN /* TSLint */,
254
- "no-undef-init": State.ON,
255
- // "no-undefined": State.OFF /* @CONFLICT: breaks Scriptable? breaks Sveltekit? */,
256
- // "no-underscore-dangle": State.OFF,
257
- "no-unneeded-ternary": State.WARN,
258
- "no-unused-expressions": [
259
- State.WARN,
260
- {
261
- allowShortCircuit: true,
262
- allowTernary: true,
263
- },
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 */,
271
- "no-useless-escape": [
272
- State.WARN,
273
- {
274
- allowRegexCharacters: ["-"],
275
- },
276
- ],
277
- "no-useless-rename": State.WARN,
278
- "no-useless-return": State.WARN,
279
- "no-var": State.WARN /* supports TypeScript */,
280
- "no-void": [
281
- State.ON,
282
- {
283
- allowAsStatement: true,
284
- },
285
- ],
286
- // "no-warning-comments": State.OFF,
287
- "no-with": State.ON,
288
- "object-shorthand": State.WARN,
289
- "one-var": [
290
- State.WARN,
291
- {
292
- "var": "consecutive",
293
- let: "consecutive",
294
- "const": "consecutive",
295
- using: "consecutive",
296
- awaitUsing: "consecutive",
297
- separateRequires: true,
298
- },
299
- ],
300
- "operator-assignment": State.WARN,
301
- "prefer-arrow-callback": State.WARN /* supports TypeScript */,
302
- "prefer-const": [
303
- State.WARN,
304
- {
305
- destructuring: "all",
306
- },
307
- ],
308
- // "prefer-destructuring": State.OFF /* TSLint BUT @preference: too prescriptive */,
309
- "prefer-exponentiation-operator": State.WARN,
310
- // "prefer-named-capture-group": State.OFF,
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,
315
- "prefer-regex-literals": [
316
- State.WARN,
317
- {
318
- disallowRedundantWrapping: true,
319
- },
320
- ] /* TSLint */,
321
- "prefer-rest-params": State.WARN,
322
- "prefer-spread": State.WARN,
323
- // "prefer-template": State.OFF /* @CONFLICT: performance */,
324
- "preserve-caught-error": [
325
- State.ON,
326
- {
327
- requireCatchParameter: true,
328
- },
329
- ],
330
- radix: State.ON,
331
- "require-await": State.ON /* TSLint */,
332
- "require-unicode-regexp": State.ON,
333
- "require-yield": State.ON,
334
- // "sort-imports": State.OFF,
335
- // "sort-keys": State.OFF,
336
- // "sort-vars": State.OFF,
337
- // strict: State.OFF,
338
- // "symbol-description": State.OFF,
339
- "vars-on-top": State.WARN,
340
- yoda: State.WARN,
341
- // #endregion
342
-
343
- // #region FORMATTING
344
- // [ https://eslint.org/docs/latest/rules/#layout--formatting ]
345
- "unicode-bom": State.WARN,
346
- // #endregion
347
- } as const,
348
- };