@eslinted/defaults 20.4.0 → 21.0.1

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 (131) hide show
  1. package/dist/index.d.ts +504 -523
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/rules/{state.d.ts → _state.d.ts} +1 -1
  4. package/dist/rules/_state.d.ts.map +1 -0
  5. package/dist/rules/_state.js +2 -0
  6. package/dist/rules/_state.js.map +1 -0
  7. package/dist/rules/{css/index.d.ts → css.d.ts} +3 -3
  8. package/dist/rules/css.d.ts.map +1 -0
  9. package/dist/rules/css.js +17 -0
  10. package/dist/rules/css.js.map +1 -0
  11. package/dist/rules/{html/index.d.ts → html.d.ts} +3 -3
  12. package/dist/rules/html.d.ts.map +1 -0
  13. package/dist/rules/html.js +41 -0
  14. package/dist/rules/html.js.map +1 -0
  15. package/dist/rules/index.d.ts +504 -523
  16. package/dist/rules/index.d.ts.map +1 -1
  17. package/dist/rules/index.js +7 -7
  18. package/dist/rules/js.d.ts +219 -221
  19. package/dist/rules/js.d.ts.map +1 -1
  20. package/dist/rules/js.js +545 -7
  21. package/dist/rules/js.js.map +1 -1
  22. package/dist/rules/{json/jsonc.d.ts → json.d.ts} +4 -2
  23. package/dist/rules/json.d.ts.map +1 -0
  24. package/dist/rules/{json/jsonc.js → json.js} +3 -1
  25. package/dist/rules/json.js.map +1 -0
  26. package/dist/rules/{jsonc/index.d.ts → jsonc.d.ts} +3 -3
  27. package/dist/rules/jsonc.d.ts.map +1 -0
  28. package/dist/rules/jsonc.js +10 -0
  29. package/dist/rules/jsonc.js.map +1 -0
  30. package/dist/rules/{svelte/svelte.d.ts → svelte.d.ts} +16 -1
  31. package/dist/rules/svelte.d.ts.map +1 -0
  32. package/dist/rules/{svelte/svelte.js → svelte.js} +15 -0
  33. package/dist/rules/svelte.js.map +1 -0
  34. package/dist/rules/{ts/ts.d.ts → ts.d.ts} +51 -1
  35. package/dist/rules/ts.d.ts.map +1 -0
  36. package/dist/rules/{ts/ts.js → ts.js} +50 -0
  37. package/dist/rules/ts.js.map +1 -0
  38. package/dist/rules/{yml/index.d.ts → yml.d.ts} +3 -3
  39. package/dist/rules/yml.d.ts.map +1 -0
  40. package/dist/rules/yml.js +32 -0
  41. package/dist/rules/yml.js.map +1 -0
  42. package/package.json +1 -1
  43. package/src/rules/css.ts +22 -0
  44. package/src/rules/html.ts +82 -0
  45. package/src/rules/js.ts +621 -6
  46. package/src/rules/{json/jsonc.ts → json.ts} +7 -1
  47. package/src/rules/jsonc.ts +11 -0
  48. package/src/rules/{svelte/svelte.ts → svelte.ts} +39 -2
  49. package/src/rules/{ts/ts.ts → ts.ts} +67 -2
  50. package/src/rules/yml.ts +56 -0
  51. package/dist/rules/css/index.d.ts.map +0 -1
  52. package/dist/rules/css/index.js +0 -19
  53. package/dist/rules/css/index.js.map +0 -1
  54. package/dist/rules/html/index.d.ts.map +0 -1
  55. package/dist/rules/html/index.js +0 -43
  56. package/dist/rules/html/index.js.map +0 -1
  57. package/dist/rules/js.eslint.d.ts +0 -289
  58. package/dist/rules/js.eslint.d.ts.map +0 -1
  59. package/dist/rules/js.eslint.js +0 -285
  60. package/dist/rules/js.eslint.js.map +0 -1
  61. package/dist/rules/js.stylistic.d.ts +0 -271
  62. package/dist/rules/js.stylistic.d.ts.map +0 -1
  63. package/dist/rules/js.stylistic.js +0 -265
  64. package/dist/rules/js.stylistic.js.map +0 -1
  65. package/dist/rules/json/index.d.ts +0 -33
  66. package/dist/rules/json/index.d.ts.map +0 -1
  67. package/dist/rules/json/index.js +0 -7
  68. package/dist/rules/json/index.js.map +0 -1
  69. package/dist/rules/json/json.d.ts +0 -9
  70. package/dist/rules/json/json.d.ts.map +0 -1
  71. package/dist/rules/json/json.js +0 -7
  72. package/dist/rules/json/json.js.map +0 -1
  73. package/dist/rules/json/jsonc.d.ts.map +0 -1
  74. package/dist/rules/json/jsonc.js.map +0 -1
  75. package/dist/rules/jsonc/index.d.ts.map +0 -1
  76. package/dist/rules/jsonc/index.js +0 -12
  77. package/dist/rules/jsonc/index.js.map +0 -1
  78. package/dist/rules/state.d.ts.map +0 -1
  79. package/dist/rules/state.js +0 -2
  80. package/dist/rules/state.js.map +0 -1
  81. package/dist/rules/svelte/disable.d.ts +0 -17
  82. package/dist/rules/svelte/disable.d.ts.map +0 -1
  83. package/dist/rules/svelte/disable.js +0 -15
  84. package/dist/rules/svelte/disable.js.map +0 -1
  85. package/dist/rules/svelte/extend.d.ts +0 -13
  86. package/dist/rules/svelte/extend.d.ts.map +0 -1
  87. package/dist/rules/svelte/extend.js +0 -11
  88. package/dist/rules/svelte/extend.js.map +0 -1
  89. package/dist/rules/svelte/html.d.ts +0 -14
  90. package/dist/rules/svelte/html.d.ts.map +0 -1
  91. package/dist/rules/svelte/html.js +0 -12
  92. package/dist/rules/svelte/html.js.map +0 -1
  93. package/dist/rules/svelte/index.d.ts +0 -115
  94. package/dist/rules/svelte/index.d.ts.map +0 -1
  95. package/dist/rules/svelte/index.js +0 -9
  96. package/dist/rules/svelte/index.js.map +0 -1
  97. package/dist/rules/svelte/svelte.d.ts.map +0 -1
  98. package/dist/rules/svelte/svelte.js.map +0 -1
  99. package/dist/rules/ts/disable.d.ts +0 -26
  100. package/dist/rules/ts/disable.d.ts.map +0 -1
  101. package/dist/rules/ts/disable.js +0 -24
  102. package/dist/rules/ts/disable.js.map +0 -1
  103. package/dist/rules/ts/extend.d.ts +0 -38
  104. package/dist/rules/ts/extend.d.ts.map +0 -1
  105. package/dist/rules/ts/extend.js +0 -36
  106. package/dist/rules/ts/extend.js.map +0 -1
  107. package/dist/rules/ts/index.d.ts +0 -242
  108. package/dist/rules/ts/index.d.ts.map +0 -1
  109. package/dist/rules/ts/index.js +0 -9
  110. package/dist/rules/ts/index.js.map +0 -1
  111. package/dist/rules/ts/ts.d.ts.map +0 -1
  112. package/dist/rules/ts/ts.js.map +0 -1
  113. package/dist/rules/yml/index.d.ts.map +0 -1
  114. package/dist/rules/yml/index.js +0 -34
  115. package/dist/rules/yml/index.js.map +0 -1
  116. package/src/rules/css/index.ts +0 -24
  117. package/src/rules/html/index.ts +0 -84
  118. package/src/rules/js.eslint.ts +0 -348
  119. package/src/rules/js.stylistic.ts +0 -279
  120. package/src/rules/json/index.ts +0 -7
  121. package/src/rules/json/json.ts +0 -13
  122. package/src/rules/jsonc/index.ts +0 -13
  123. package/src/rules/svelte/disable.ts +0 -21
  124. package/src/rules/svelte/extend.ts +0 -14
  125. package/src/rules/svelte/html.ts +0 -14
  126. package/src/rules/svelte/index.ts +0 -11
  127. package/src/rules/ts/disable.ts +0 -26
  128. package/src/rules/ts/extend.ts +0 -42
  129. package/src/rules/ts/index.ts +0 -9
  130. package/src/rules/yml/index.ts +0 -58
  131. /package/src/rules/{state.ts → _state.ts} +0 -0
@@ -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
- };
@@ -1,279 +0,0 @@
1
- import { State } from "./state";
2
-
3
- // DOC: https://eslint.style/rules
4
- export default {
5
- rules: {
6
- // "global"
7
- "stylistic/eol-last": State.WARN,
8
- "stylistic/linebreak-style": State.WARN,
9
- // end
10
-
11
- "stylistic/array-bracket-newline": State.WARN,
12
- "stylistic/array-bracket-spacing": State.WARN,
13
- "stylistic/array-element-newline": [
14
- State.WARN,
15
- {
16
- consistent: true,
17
- multiline: true,
18
- minItems: 3,
19
- },
20
- ],
21
- "stylistic/arrow-parens": [
22
- State.WARN,
23
- "as-needed",
24
- ],
25
- "stylistic/arrow-spacing": State.WARN,
26
- "stylistic/block-spacing": State.WARN,
27
- "stylistic/brace-style": [
28
- State.WARN,
29
- "stroustrup",
30
- {
31
- allowSingleLine: true,
32
- },
33
- ],
34
- "stylistic/comma-dangle": [
35
- State.WARN,
36
- "always-multiline",
37
- ],
38
- "stylistic/comma-spacing": State.WARN,
39
- "stylistic/comma-style": State.WARN,
40
- "stylistic/computed-property-spacing": State.WARN,
41
- "stylistic/curly-newline": State.WARN,
42
- "stylistic/dot-location": [
43
- State.WARN,
44
- "property",
45
- ],
46
- // "stylistic/eol-last": State.OFF /* @global */,
47
- "stylistic/function-call-argument-newline": [
48
- State.WARN,
49
- "consistent",
50
- ],
51
- "stylistic/function-call-spacing": State.WARN,
52
- "stylistic/function-paren-newline": [
53
- State.WARN,
54
- "multiline-arguments",
55
- ] /* BUG: https://github.com/eslint-stylistic/eslint-stylistic/issues/290 */,
56
- "stylistic/generator-star-spacing": State.WARN,
57
- "stylistic/implicit-arrow-linebreak": State.WARN,
58
- "stylistic/indent": [
59
- State.WARN,
60
- 2,
61
- {
62
- assignmentOperator: 0,
63
- VariableDeclarator: {
64
- "var": 0,
65
- let: 0,
66
- "const": 0,
67
- },
68
- outerIIFEBody: 0,
69
- offsetTernaryExpressions: true,
70
- },
71
- ],
72
- "stylistic/indent-binary-ops": [
73
- State.WARN,
74
- 2 /* MUST be same as `stylistic/indent`[1] */,
75
- ],
76
- "stylistic/key-spacing": State.WARN,
77
- "stylistic/keyword-spacing": State.WARN,
78
- // "stylistic/line-comment-position": State.OFF,
79
- // "stylistic/linebreak-style": State.OFF /* @global */,
80
- // "stylistic/lines-around-comment": State.OFF,
81
- "stylistic/lines-between-class-members": [
82
- State.WARN,
83
- {
84
- enforce: [
85
- {
86
- prev: "field",
87
- next: "field",
88
- blankLine: "never",
89
- },
90
- {
91
- prev: "field",
92
- next: "method",
93
- blankLine: "always",
94
- },
95
- {
96
- prev: "method",
97
- next: "*",
98
- blankLine: "always",
99
- },
100
- ],
101
- },
102
- ],
103
- "stylistic/max-len": [
104
- State.WARN,
105
- {
106
- code: 300,
107
- ignoreComments: true,
108
- ignoreTrailingComments: true,
109
- ignoreUrls: true,
110
- ignoreStrings: true,
111
- ignoreTemplateLiterals: true,
112
- ignoreRegExpLiterals: true,
113
- },
114
- ],
115
- "stylistic/max-statements-per-line": State.WARN,
116
- "stylistic/member-delimiter-style": State.WARN,
117
- // "stylistic/multiline-comment-style": State.OFF,
118
- "stylistic/multiline-ternary": [
119
- State.WARN,
120
- "always-multiline",
121
- ],
122
- // "stylistic/new-parens": State.OFF,
123
- "stylistic/newline-per-chained-call": [
124
- State.WARN,
125
- {
126
- ignoreChainWithDepth: 1,
127
- },
128
- ],
129
- // "stylistic/no-confusing-arrow": State.OFF,
130
- "stylistic/no-extra-parens": State.WARN,
131
- "stylistic/no-extra-semi": State.WARN,
132
- "stylistic/no-floating-decimal": State.WARN,
133
- // "stylistic/no-mixed-operators": State.OFF,
134
- "stylistic/no-mixed-spaces-and-tabs": State.WARN,
135
- "stylistic/no-multi-spaces": [
136
- State.WARN,
137
- {
138
- exceptions: {
139
- Property: false,
140
- ImportAttributes: false,
141
- },
142
- },
143
- ],
144
- "stylistic/no-multiple-empty-lines": [
145
- State.WARN,
146
- {
147
- max: 1,
148
- maxBOF: 0,
149
- maxEOF: 0 /* INFO: combine with `eol-last` to ensure file still ends with a single line-break (eol character) */,
150
- },
151
- ],
152
- "stylistic/no-tabs": State.WARN,
153
- "stylistic/no-trailing-spaces": State.WARN,
154
- "stylistic/no-whitespace-before-property": State.WARN,
155
- "stylistic/nonblock-statement-body-position": [
156
- State.WARN,
157
- "below",
158
- ],
159
- "stylistic/object-curly-newline": [
160
- State.WARN,
161
- {
162
- consistent: true,
163
- multiline: true,
164
- minProperties: 3,
165
- },
166
- ],
167
- "stylistic/object-curly-spacing": [
168
- State.WARN,
169
- "always",
170
- {
171
- emptyObjects: "never",
172
- },
173
- ],
174
- "stylistic/object-property-newline": State.WARN,
175
- "stylistic/one-var-declaration-per-line": [
176
- State.WARN,
177
- "always",
178
- ],
179
- "stylistic/operator-linebreak": [
180
- State.WARN,
181
- "before",
182
- ],
183
- "stylistic/padded-blocks": [
184
- State.WARN,
185
- "never",
186
- {
187
- allowSingleLineBlocks: true,
188
- },
189
- ],
190
- // "stylistic/padding-line-between-statements": State.OFF /* BUG: when in editor, always removes too many lines and ends up crushing two lines into one statement, which then cannot be autofixed */,
191
- "stylistic/quote-props": [
192
- State.WARN,
193
- "as-needed",
194
- {
195
- keywords: true,
196
- },
197
- ],
198
- "stylistic/quotes": [
199
- State.WARN,
200
- "double",
201
- {
202
- avoidEscape: true,
203
- allowTemplateLiterals: "always",
204
- },
205
- ],
206
- "stylistic/rest-spread-spacing": State.WARN,
207
- "stylistic/semi": State.WARN,
208
- "stylistic/semi-spacing": State.WARN,
209
- "stylistic/semi-style": State.WARN,
210
- "stylistic/space-before-blocks": State.WARN,
211
- "stylistic/space-before-function-paren": [
212
- State.WARN,
213
- {
214
- named: "never",
215
- },
216
- ],
217
- "stylistic/space-in-parens": State.WARN,
218
- "stylistic/space-infix-ops": State.WARN,
219
- "stylistic/space-unary-ops": State.WARN,
220
- "stylistic/spaced-comment": [
221
- State.WARN,
222
- "always",
223
- {
224
- line: {
225
- exceptions: [
226
- "/",
227
- "-",
228
- "+",
229
- "=",
230
- ],
231
- markers: [
232
- "!",
233
- "@",
234
- "#",
235
- "/",
236
- "#region",
237
- "#endregion",
238
- "#part",
239
- "/#region",
240
- "/#endregion",
241
- "/#part",
242
- ],
243
- },
244
- block: {
245
- exceptions: ["*"],
246
- markers: ["*"],
247
- balanced: true,
248
- },
249
- },
250
- ],
251
- "stylistic/switch-colon-spacing": State.WARN,
252
- "stylistic/template-curly-spacing": State.WARN,
253
- "stylistic/template-tag-spacing": State.WARN,
254
- "stylistic/type-annotation-spacing": [
255
- State.WARN,
256
- {
257
- before: true,
258
- after: true,
259
- overrides: {
260
- colon: {
261
- before: false,
262
- after: true,
263
- },
264
- },
265
- } /* BUG: non-overriden rule affects all type annotations (arrows, "as" keyword, "satisfies" keyword) except colons */,
266
- ],
267
- "stylistic/type-generic-spacing": State.WARN,
268
- "stylistic/type-named-tuple-spacing": State.WARN,
269
- "stylistic/wrap-iife": [
270
- State.WARN,
271
- "inside",
272
- {
273
- functionPrototypeMethods: true,
274
- },
275
- ],
276
- "stylistic/wrap-regex": State.WARN,
277
- "stylistic/yield-star-spacing": State.WARN,
278
- } as const,
279
- };
@@ -1,7 +0,0 @@
1
- import json from "./json";
2
- import jsonc from "./jsonc";
3
-
4
- export default [
5
- json,
6
- jsonc,
7
- ];
@@ -1,13 +0,0 @@
1
- import { State } from "../state";
2
-
3
- // DOC: https://github.com/eslint/json?tab=readme-ov-file#rules
4
- export default {
5
- rules: {
6
- // "json/no-duplicate-keys": State.OFF /* jsonc/no-dupe-keys */,
7
- // "json/no-empty-keys": State.OFF,
8
- "json/no-unsafe-values": State.ON,
9
- "json/no-unnormalized-keys": State.ON,
10
- // "json/sort-keys": State.OFF /* jsonc/sort-keys */,
11
- // "json/top-level-interop": State.OFF /* rarely useful */,
12
- } as const,
13
- };
@@ -1,13 +0,0 @@
1
- import { State } from "../state";
2
-
3
- export default [
4
- {
5
- rules: {
6
- "jsonc/comma-dangle": [
7
- State.WARN,
8
- "always-multiline",
9
- ],
10
- "jsonc/no-comments": State.OFF,
11
- } as const,
12
- },
13
- ];
@@ -1,21 +0,0 @@
1
- import { State } from "../state";
2
-
3
- // DOC: https://github.com/sveltejs/eslint-plugin-svelte/blob/ca37fbbe82d01019946e12eeb1b57c2a5736c018/packages/eslint-plugin-svelte/src/configs/base.ts
4
- export default {
5
- rules: {
6
- // ESLint core rules known to cause problems with `.svelte`.
7
- "no-inner-declarations":
8
- State.OFF /* The AST generated by svelte-eslint-parser will false positive because the root node of the script is not `Program`. INFO: also extended by svelte */,
9
- "no-self-assign": State.OFF /* Self assign is one of way to update reactive value in Svelte. */,
10
- "no-unused-vars": State.OFF /* breaks use of svelte global */,
11
- "ts/no-unused-vars": State.OFF /* breaks use of svelte global */,
12
- "prefer-const": State.OFF /* svelte/prefer-const */,
13
- // My own
14
- "stylistic/indent": State.OFF /* @CONFLICT: with `svelte/indent` */,
15
- "ts/no-confusing-void-expression": State.OFF /* @CONFLICT: errors on render() */,
16
- // My own (dprint)
17
- "stylistic/member-delimiter-style": State.OFF,
18
- "stylistic/object-curly-spacing": State.OFF,
19
- "stylistic/semi": State.OFF,
20
- } as const,
21
- };
@@ -1,14 +0,0 @@
1
- import { State } from "../state";
2
-
3
- // DOC: http://sveltejs.github.io/eslint-plugin-svelte/rules/#extension-rules
4
- export default {
5
- rules: {
6
- /* @OVERRIDE */ "no-inner-declarations": State.OFF /* INFO: also disabled by svelte */,
7
- "svelte/no-inner-declarations": [
8
- State.ON,
9
- "both",
10
- ] /* same options: no-inner-declarations */,
11
- /* @OVERRIDE */ "stylistic/no-trailing-spaces": State.OFF /* replaces `no-trailing-spaces` */,
12
- // "svelte/no-trailing-spaces": State.OFF,
13
- } as const,
14
- };