linted 16.12.2-rc.0 → 16.12.2-rc.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (189) hide show
  1. package/.github/workflows/RELEASE.yml +35 -35
  2. package/.github/workflows/rc.yml +35 -35
  3. package/LICENSE +21 -21
  4. package/README.md +390 -390
  5. package/SECURITY.md +9 -9
  6. package/dist/imports/plugins.d.ts.map +1 -1
  7. package/dist/imports.d.ts.map +1 -1
  8. package/dist/rules/html/enable.d.ts +8 -0
  9. package/dist/rules/html/enable.d.ts.map +1 -0
  10. package/dist/rules/html/enable.js +15 -0
  11. package/dist/rules/html/enable.js.map +1 -0
  12. package/dist/rules/html/enable_recommended.d.ts +3 -0
  13. package/dist/rules/html/enable_recommended.d.ts.map +1 -0
  14. package/dist/rules/html/enable_recommended.js +8 -0
  15. package/dist/rules/html/enable_recommended.js.map +1 -0
  16. package/dist/rules/html.d.ts +8 -0
  17. package/dist/rules/html.d.ts.map +1 -0
  18. package/dist/rules/html.js +4 -0
  19. package/dist/rules/html.js.map +1 -0
  20. package/dist/rules/js/enable.d.ts +348 -0
  21. package/dist/rules/js/enable.d.ts.map +1 -0
  22. package/dist/rules/js/enable.js +496 -0
  23. package/dist/rules/js/enable.js.map +1 -0
  24. package/dist/rules/js/enable_stylistic.d.ts +420 -0
  25. package/dist/rules/js/enable_stylistic.d.ts.map +1 -0
  26. package/dist/rules/js/enable_stylistic.js +585 -0
  27. package/dist/rules/js/enable_stylistic.js.map +1 -0
  28. package/dist/rules/js.d.ts +765 -0
  29. package/dist/rules/js.d.ts.map +1 -0
  30. package/dist/rules/js.js +4 -0
  31. package/dist/rules/js.js.map +1 -0
  32. package/dist/rules/json/enable.d.ts +27 -0
  33. package/dist/rules/json/enable.d.ts.map +1 -0
  34. package/dist/rules/json/enable.js +31 -0
  35. package/dist/rules/json/enable.js.map +1 -0
  36. package/dist/rules/json/enable_x.d.ts.map +1 -1
  37. package/dist/rules/json/enable_x.js +48 -8
  38. package/dist/rules/json/enable_x.js.map +1 -1
  39. package/dist/rules/json.d.ts +74 -0
  40. package/dist/rules/json.d.ts.map +1 -0
  41. package/dist/rules/json.js +4 -0
  42. package/dist/rules/json.js.map +1 -0
  43. package/dist/rules/jsonc/override.d.ts.map +1 -1
  44. package/dist/rules/jsonc/override.js +12 -3
  45. package/dist/rules/jsonc/override.js.map +1 -1
  46. package/dist/rules/jsonc.d.ts +77 -0
  47. package/dist/rules/jsonc.d.ts.map +1 -0
  48. package/dist/rules/jsonc.js +4 -0
  49. package/dist/rules/jsonc.js.map +1 -0
  50. package/dist/rules/md/enable.d.ts +7 -0
  51. package/dist/rules/md/enable.d.ts.map +1 -0
  52. package/dist/rules/md/enable.js +14 -0
  53. package/dist/rules/md/enable.js.map +1 -0
  54. package/dist/rules/md.d.ts +7 -0
  55. package/dist/rules/md.d.ts.map +1 -0
  56. package/dist/rules/md.js +3 -0
  57. package/dist/rules/md.js.map +1 -0
  58. package/dist/rules/mocha/enable.d.ts +3 -0
  59. package/dist/rules/mocha/enable.d.ts.map +1 -0
  60. package/dist/rules/mocha/enable.js +3 -0
  61. package/dist/rules/mocha/enable.js.map +1 -0
  62. package/dist/rules/mocha/enable_recommended.d.ts +3 -0
  63. package/dist/rules/mocha/enable_recommended.d.ts.map +1 -0
  64. package/dist/rules/mocha/enable_recommended.js +8 -0
  65. package/dist/rules/mocha/enable_recommended.js.map +1 -0
  66. package/dist/rules/mocha.d.ts +8 -0
  67. package/dist/rules/mocha.d.ts.map +1 -0
  68. package/dist/rules/mocha.js +4 -0
  69. package/dist/rules/mocha.js.map +1 -0
  70. package/dist/rules/svelte/disable.d.ts +5 -0
  71. package/dist/rules/svelte/disable.d.ts.map +1 -0
  72. package/dist/rules/svelte/disable.js +8 -0
  73. package/dist/rules/svelte/disable.js.map +1 -0
  74. package/dist/rules/svelte/disable_js.d.ts.map +1 -1
  75. package/dist/rules/svelte/disable_js.js +8 -3
  76. package/dist/rules/svelte/disable_js.js.map +1 -1
  77. package/dist/rules/svelte/disable_ts.d.ts.map +1 -1
  78. package/dist/rules/svelte/disable_ts.js +8 -3
  79. package/dist/rules/svelte/disable_ts.js.map +1 -1
  80. package/dist/rules/svelte/enable.d.ts +126 -0
  81. package/dist/rules/svelte/enable.d.ts.map +1 -0
  82. package/dist/rules/svelte/enable.js +190 -0
  83. package/dist/rules/svelte/enable.js.map +1 -0
  84. package/dist/rules/svelte/enable_x.d.ts.map +1 -1
  85. package/dist/rules/svelte/enable_x.js +15 -3
  86. package/dist/rules/svelte/enable_x.js.map +1 -1
  87. package/dist/rules/svelte.d.ts +1269 -0
  88. package/dist/rules/svelte.d.ts.map +1 -0
  89. package/dist/rules/svelte.js +15 -0
  90. package/dist/rules/svelte.js.map +1 -0
  91. package/dist/rules/ts/disable.d.ts +18 -0
  92. package/dist/rules/ts/disable.d.ts.map +1 -0
  93. package/dist/rules/ts/disable.js +21 -0
  94. package/dist/rules/ts/disable.js.map +1 -0
  95. package/dist/rules/ts/disable_x.d.ts.map +1 -1
  96. package/dist/rules/ts/disable_x.js +1 -2
  97. package/dist/rules/ts/disable_x.js.map +1 -1
  98. package/dist/rules/ts/enable.d.ts +262 -0
  99. package/dist/rules/ts/enable.d.ts.map +1 -0
  100. package/dist/rules/ts/enable.js +503 -0
  101. package/dist/rules/ts/enable.js.map +1 -0
  102. package/dist/rules/ts/enable_x.d.ts.map +1 -1
  103. package/dist/rules/ts/enable_x.js +32 -5
  104. package/dist/rules/ts/enable_x.js.map +1 -1
  105. package/dist/rules/ts.d.ts +1133 -0
  106. package/dist/rules/ts.d.ts.map +1 -0
  107. package/dist/rules/ts.js +13 -0
  108. package/dist/rules/ts.js.map +1 -0
  109. package/dist/rules/yml/enable.d.ts +39 -0
  110. package/dist/rules/yml/enable.d.ts.map +1 -0
  111. package/dist/rules/yml/enable.js +60 -0
  112. package/dist/rules/yml/enable.js.map +1 -0
  113. package/dist/rules/yml/enable_x.d.ts.map +1 -1
  114. package/dist/rules/yml/enable_x.js +57 -9
  115. package/dist/rules/yml/enable_x.js.map +1 -1
  116. package/dist/rules/yml.d.ts +73 -0
  117. package/dist/rules/yml.d.ts.map +1 -0
  118. package/dist/rules/yml.js +4 -0
  119. package/dist/rules/yml.js.map +1 -0
  120. package/dist/rules.d.ts +75 -75
  121. package/dist/rules.js +9 -9
  122. package/dist/rules.js.map +1 -1
  123. package/eslint.config.js +3 -3
  124. package/package.json +99 -99
  125. package/src/files/html.ts +1 -1
  126. package/src/files/js.ts +1 -1
  127. package/src/files/json.ts +1 -1
  128. package/src/files/jsonc.ts +4 -4
  129. package/src/files/md.ts +1 -1
  130. package/src/files/mocha.ts +1 -1
  131. package/src/files/svelte.ts +1 -1
  132. package/src/files/ts.ts +5 -5
  133. package/src/files/yml.ts +5 -5
  134. package/src/files.ts +22 -22
  135. package/src/imports/parsers.ts +15 -15
  136. package/src/imports/plugins.ts +19 -19
  137. package/src/imports.ts +8 -8
  138. package/src/index.ts +36 -36
  139. package/src/rules/_strings/id.ts +18 -18
  140. package/src/rules/_strings/level.ts +6 -6
  141. package/src/rules/_strings/state.ts +56 -56
  142. package/src/rules/_strings.ts +6 -6
  143. package/src/rules/html/enable.ts +16 -0
  144. package/src/rules/html/enable_recommended.ts +9 -0
  145. package/src/rules/html.ts +4 -0
  146. package/src/rules/js/enable.ts +524 -0
  147. package/src/rules/js/enable_stylistic.ts +608 -0
  148. package/src/rules/js.ts +4 -0
  149. package/src/rules/json/{_enable.ts → enable.ts} +33 -35
  150. package/src/rules/json/enable_x.ts +89 -50
  151. package/src/rules/{_json.ts → json.ts} +4 -4
  152. package/src/rules/jsonc/override.ts +16 -9
  153. package/src/rules/{_jsonc.ts → jsonc.ts} +4 -4
  154. package/src/rules/md/enable.ts +15 -0
  155. package/src/rules/md.ts +3 -0
  156. package/src/rules/mocha/enable.ts +3 -0
  157. package/src/rules/mocha/enable_recommended.ts +9 -0
  158. package/src/rules/mocha.ts +4 -0
  159. package/src/rules/svelte/disable.ts +9 -0
  160. package/src/rules/svelte/disable_js.ts +11 -7
  161. package/src/rules/svelte/disable_ts.ts +9 -5
  162. package/src/rules/svelte/{_enable.ts → enable.ts} +228 -129
  163. package/src/rules/svelte/enable_x.ts +20 -9
  164. package/src/rules/{_svelte.ts → svelte.ts} +15 -15
  165. package/src/rules/ts/{disable_compiler.ts → disable.ts} +22 -23
  166. package/src/rules/ts/disable_x.ts +32 -36
  167. package/src/rules/ts/{_enable.ts → enable.ts} +549 -406
  168. package/src/rules/ts/enable_x.ts +115 -90
  169. package/src/rules/{_ts.ts → ts.ts} +13 -13
  170. package/src/rules/yml/{_enable.ts → enable.ts} +64 -33
  171. package/src/rules/yml/enable_x.ts +68 -21
  172. package/src/rules/{_yml.ts → yml.ts} +4 -4
  173. package/src/rules.ts +22 -22
  174. package/tsconfig.json +161 -161
  175. package/types/markdownlint/index.d.ts +3 -3
  176. package/types/markdownlint/parser.d.ts +9 -9
  177. package/types/mocha/index.d.ts +8 -8
  178. package/src/rules/_html.ts +0 -4
  179. package/src/rules/_js.ts +0 -4
  180. package/src/rules/_md.ts +0 -3
  181. package/src/rules/_mocha.ts +0 -4
  182. package/src/rules/html/_enable.ts +0 -13
  183. package/src/rules/html/_recommended.ts +0 -7
  184. package/src/rules/js/_enable.ts +0 -287
  185. package/src/rules/js/stylistic.ts +0 -294
  186. package/src/rules/md/_enable.ts +0 -14
  187. package/src/rules/mocha/_enable.ts +0 -5
  188. package/src/rules/mocha/_recommended.ts +0 -7
  189. package/src/rules/svelte/disable_x.ts +0 -8
@@ -1,287 +0,0 @@
1
- import { id, level, state } from "../_strings.js";
2
-
3
- const
4
- { enable } = id,
5
- { ERROR, OFF } = level,
6
- {
7
- Never,
8
- Always,
9
- AsNeeded,
10
- Consecutive,
11
- Allow,
12
- All,
13
- Multi,
14
- Both,
15
- } = state;
16
-
17
- export default [
18
- enable,
19
- {
20
- // #region Problems
21
- // [ https://eslint.org/docs/latest/rules/#possible-problems ]
22
- "array-callback-return": [ERROR, { allowImplicit: false, checkForEach: true, allowVoid: true }],
23
- "constructor-super": ERROR, /* tsc */
24
- "for-direction": ERROR,
25
- "getter-return": [ERROR, { allowImplicit: false }], /* tsc */
26
- "no-async-promise-executor": ERROR,
27
- "no-await-in-loop": ERROR,
28
- "no-class-assign": ERROR,
29
- "no-compare-neg-zero": ERROR,
30
- "no-cond-assign": [ERROR, Always],
31
- "no-const-assign": ERROR, /* tsc */
32
- "no-constant-binary-expression": ERROR,
33
- "no-constant-condition": [ERROR, { checkLoops: true }], /* BUG: incorrect option description (claims "all" is ok): https://eslint.org/docs/latest/rules/no-constant-condition */
34
- "no-constructor-return": ERROR,
35
- "no-control-regex": ERROR,
36
- "no-debugger": ERROR,
37
- "no-dupe-args": ERROR, /* tsc */
38
- "no-dupe-class-members": ERROR, /* tsc -- TSLint:off: tsc */
39
- "no-dupe-else-if": ERROR,
40
- "no-dupe-keys": ERROR, /* tsc */
41
- "no-duplicate-case": ERROR,
42
- "no-duplicate-imports": OFF, /* BUG: breaks separation of TS type-only imports from value imports */
43
- "no-empty-character-class": ERROR,
44
- "no-empty-pattern": [ERROR, { allowObjectPatternsAsParameters: false }],
45
- "no-ex-assign": ERROR,
46
- "no-fallthrough": [ERROR, { allowEmptyCase: true, reportUnusedFallthroughComment: true }],
47
- "no-func-assign": ERROR, /* tsc */
48
- "no-import-assign": ERROR, /* tsc (except Object.assign()) */
49
- "no-inner-declarations": [ERROR, Both, { blockScopedFunctions: Allow }],
50
- "no-invalid-regexp": [ERROR, { allowConstructorFlags: [] }],
51
- "no-irregular-whitespace": [
52
- ERROR,
53
- {
54
- skipStrings: true,
55
- skipComments: true,
56
- skipRegExps: true,
57
- skipTemplates: true,
58
- skipJSXText: true,
59
- },
60
- ],
61
- "no-loss-of-precision": ERROR, /* TSLint */
62
- "no-misleading-character-class": ERROR,
63
- "no-new-native-nonconstructor": ERROR,
64
- "no-obj-calls": ERROR, /* tsc */
65
- "no-promise-executor-return": [ERROR, { allowVoid: true }],
66
- "no-prototype-builtins": ERROR,
67
- "no-self-assign": [ERROR, { props: true }],
68
- "no-self-compare": ERROR,
69
- "no-setter-return": ERROR, /* tsc */
70
- "no-sparse-arrays": ERROR,
71
- "no-template-curly-in-string": ERROR,
72
- "no-this-before-super": ERROR, /* tsc */
73
- "no-undef": ERROR, /* tsc */
74
- "no-unexpected-multiline": ERROR,
75
- "no-unmodified-loop-condition": ERROR,
76
- "no-unreachable": ERROR, /* tsc */
77
- "no-unreachable-loop": [ERROR, { ignore: [] /* WhileStatement, DoWhileStatement, ForStatement, ForInStatement, ForOfStatement */ }],
78
- "no-unsafe-finally": ERROR,
79
- "no-unsafe-negation": [ERROR, { enforceForOrderingRelations: true }], /* tsc */
80
- "no-unsafe-optional-chaining": [ERROR, { disallowArithmeticOperators: true }],
81
- "no-unused-private-class-members": ERROR,
82
- "no-unused-vars": [
83
- ERROR,
84
- {
85
- vars: All,
86
- args: All,
87
- caughtErrors: All,
88
- ignoreRestSiblings: false,
89
- ignoreClassWithStaticInitBlock: false,
90
- reportUsedIgnorePattern: true,
91
- },
92
- ], /* TSLint */
93
- "no-use-before-define": [
94
- ERROR,
95
- {
96
- functions: true,
97
- classes: true,
98
- variables: true,
99
- allowNamedExports: false,
100
- },
101
- ], /* TSLint */
102
- "no-useless-assignment": ERROR,
103
- "no-useless-backreference": ERROR,
104
- "require-atomic-updates": [ERROR, { allowProperties: false }],
105
- "use-isnan": [ERROR, { enforceForSwitchCase: true, enforceForIndexOf: true }],
106
- "valid-typeof": [ERROR, { requireStringLiterals: true }],
107
-
108
- // #endregion
109
-
110
- // #region Suggestions
111
- // [ https://eslint.org/docs/latest/rules/#suggestions ]
112
- "accessor-pairs": [ERROR, { setWithoutGet: true, getWithoutSet: false, enforceForClassMembers: true }],
113
- "arrow-body-style": [ERROR, AsNeeded, { requireReturnForObjectLiteral: true }],
114
- "block-scoped-var": ERROR,
115
- camelcase: OFF, /* preference */
116
- "capitalized-comments": OFF, /* preference */
117
- "class-methods-use-this": OFF, /* preference -- TSLint */
118
- complexity: OFF, /* preference */
119
- "consistent-return": [ERROR, { treatUndefinedAsUnspecified: false }], /* tsc -- TSLint:off: tsconfig: noImplicitReturns */
120
- "consistent-this": ERROR,
121
- curly: [ERROR, Multi],
122
- "default-case": OFF, /* preference: don't care */
123
- "default-case-last": ERROR,
124
- "default-param-last": ERROR, /* TSLint */
125
- "dot-notation": [ERROR, { allowKeywords: true }], /* TSLint */
126
- eqeqeq: [ERROR, Always],
127
- "func-name-matching": OFF, /* preference */
128
- "func-names": OFF, /* preference */
129
- "func-style": OFF, /* preference */
130
- "grouped-accessor-pairs": OFF, /* preference -- BUG: requires adjacency, not as described in documentation */
131
- "guard-for-in": 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 */
132
- "id-denylist": OFF, /* preference */
133
- "id-length": OFF, /* preference */
134
- "id-match": OFF, /* preference */
135
- "init-declarations": [ERROR, Always], /* TSLint */
136
- "logical-assignment-operators": [ERROR, Always, { enforceForIfStatements: true }],
137
- "max-classes-per-file": OFF, /* preference */
138
- "max-depth": OFF, /* preference */
139
- "max-lines": OFF, /* preference */
140
- "max-lines-per-function": OFF, /* preference */
141
- "max-nested-callbacks": OFF, /* preference */
142
- "max-params": OFF, /* preference -- TSLint:off: preference */
143
- "max-statements": OFF, /* preference */
144
- "multiline-comment-style": OFF, /* preference */
145
- "new-cap": OFF, /* preference -- breaks Scriptable */
146
- "no-alert": ERROR,
147
- "no-array-constructor": ERROR, /* TSLint */
148
- "no-bitwise": [ERROR, { allow: [], int32Hint: true }],
149
- "no-caller": ERROR,
150
- "no-case-declarations": ERROR,
151
- "no-console": OFF, /* preference -- breaks Node.js console applications and Scriptable, and otherwise unnecessarily hampers browser test code */
152
- "no-continue": ERROR,
153
- "no-delete-var": ERROR,
154
- "no-div-regex": ERROR,
155
- "no-else-return": OFF, /* preference */
156
- "no-empty": [ERROR, { allowEmptyCatch: false }],
157
- "no-empty-function": [ERROR, { allow: ["constructors"] /** functions, arrowFunctions, generatorFunctions, methods, generatorMethods, getters, setters, constructors, asyncFunctions, asyncMethods; TS-ONLY: private-constructors, protected-constructors, decoratedFunctions, overrideMethods */ }], /* TSLint */
158
- "no-empty-static-block": ERROR,
159
- "no-eq-null": ERROR,
160
- "no-eval": [ERROR, { allowIndirect: false }],
161
- "no-extend-native": [ERROR, { exceptions: [] }],
162
- "no-extra-bind": ERROR,
163
- "no-extra-boolean-cast": [ERROR, { enforceForLogicalOperands: true }],
164
- "no-extra-label": ERROR,
165
- "no-global-assign": [ERROR, { exceptions: [] }],
166
- "no-implicit-coercion": [
167
- ERROR,
168
- {
169
- "boolean": true,
170
- number: true,
171
- string: true,
172
- disallowTemplateShorthand: true,
173
- allow: [], /** "~" | "!!" | "+" | "- -" | "-" | "*" */
174
- },
175
- ],
176
- "no-implicit-globals": OFF, /* investigate (breaks Scriptable? breaks Sveltekit?) */
177
- "no-implied-eval": ERROR, /* TSLint */
178
- "no-inline-comments": OFF, /* preference */
179
- "no-invalid-this": [ERROR, { capIsConstructor: false }], /* TSLint:off: tsconfig: { strict, noImplicitThis } */
180
- "no-iterator": ERROR,
181
- "no-label-var": ERROR,
182
- "no-lone-blocks": ERROR,
183
- "no-lonely-if": OFF, /* preference */
184
- "no-loop-func": ERROR, /* TSLint */
185
- "no-magic-numbers": OFF, /* preference - breaks TypeScript number literals, even with most liberal exceptions */
186
- "no-multi-assign": [ERROR, { ignoreNonDeclaration: false }],
187
- "no-multi-str": ERROR,
188
- "no-negated-condition": OFF, /* preference */
189
- "no-nested-ternary": OFF, /* preference */
190
- "no-new": ERROR,
191
- "no-new-func": ERROR,
192
- "no-new-wrappers": ERROR,
193
- "no-nonoctal-decimal-escape": ERROR,
194
- "no-object-constructor": ERROR,
195
- "no-octal": ERROR,
196
- "no-octal-escape": ERROR,
197
- "no-param-reassign": [ERROR, { props: true, ignorePropertyModificationsFor: [], ignorePropertyModificationsForRegex: [] }],
198
- "no-plusplus": [ERROR, { allowForLoopAfterthoughts: true }],
199
- "no-proto": ERROR,
200
- "no-redeclare": [ERROR, { builtinGlobals: true }], /* tsc -- TSLint:off: tsc (let, const, -var) */
201
- "no-regex-spaces": OFF, /* preference */
202
- "no-restricted-exports": OFF, /* preference */
203
- "no-restricted-globals": OFF, /* preference */
204
- "no-restricted-imports": OFF, /* preference -- TSLint:off */
205
- "no-restricted-properties": OFF, /* preference */
206
- "no-restricted-syntax": OFF, /* preference */
207
- "no-return-assign": [ERROR, Always], /* ALWAYS | "except-parens" (disallow assignments unless enclosed in parens) */
208
- "no-script-url": ERROR,
209
- "no-sequences": [ERROR, { allowInParentheses: true }],
210
- "no-shadow": OFF, /* investigate -- TSLint:off: investigate */
211
- "no-shadow-restricted-names": ERROR,
212
- "no-ternary": OFF, /* preference */
213
- "no-throw-literal": ERROR, /* TSLint */
214
- "no-undef-init": ERROR,
215
- "no-undefined": OFF, /* investigate (breaks Scriptable? breaks Sveltekit?) */
216
- "no-underscore-dangle": OFF, /* preference */
217
- "no-unneeded-ternary": [ERROR, { defaultAssignment: false }],
218
- "no-unused-expressions": [
219
- ERROR,
220
- {
221
- allowShortCircuit: true,
222
- allowTernary: true,
223
- allowTaggedTemplates: true,
224
- enforceForJSX: false,
225
- },
226
- ], /* TSLint */
227
- "no-unused-labels": ERROR,
228
- "no-useless-call": ERROR,
229
- "no-useless-catch": ERROR,
230
- "no-useless-computed-key": [ERROR, { enforceForClassMembers: true }],
231
- "no-useless-concat": ERROR,
232
- "no-useless-constructor": ERROR, /* TSLint */
233
- "no-useless-escape": ERROR,
234
- "no-useless-rename": [ERROR, { ignoreImport: false, ignoreExport: false, ignoreDestructuring: false }],
235
- "no-useless-return": ERROR,
236
- "no-var": ERROR,
237
- "no-void": [ERROR, { allowAsStatement: true }],
238
- "no-warning-comments": OFF, /* preference */
239
- "no-with": ERROR,
240
- "object-shorthand": [ERROR, Always, { avoidQuotes: true, ignoreConstructors: false, avoidExplicitReturnArrows: false }],
241
- "one-var": [
242
- ERROR,
243
- {
244
- "var": Consecutive,
245
- let: Consecutive,
246
- "const": Consecutive,
247
- separateRequires: true,
248
- },
249
- ],
250
- "operator-assignment": [ERROR, Always],
251
- "prefer-arrow-callback": [ERROR, { allowNamedFunctions: false, allowUnboundThis: true }],
252
- "prefer-const": [
253
- ERROR,
254
- { destructuring: All, ignoreReadBeforeAssign: false },
255
- ],
256
- "prefer-destructuring": [ERROR, { VariableDeclarator: { array: true, object: true }, AssignmentExpression: { array: false, object: false } }, { enforceForRenamedProperties: true }], /* TSLint */
257
- "prefer-exponentiation-operator": ERROR,
258
- "prefer-named-capture-group": OFF,
259
- "prefer-numeric-literals": ERROR,
260
- "prefer-object-has-own": ERROR,
261
- "prefer-object-spread": ERROR,
262
- "prefer-promise-reject-errors": [ERROR, { allowEmptyReject: false }],
263
- "prefer-regex-literals": [ERROR, { disallowRedundantWrapping: true }], /* TSLint */
264
- "prefer-rest-params": ERROR,
265
- "prefer-spread": ERROR,
266
- "prefer-template": ERROR,
267
- radix: [ERROR, AsNeeded],
268
- "require-await": ERROR, /* TSLint */
269
- "require-unicode-regexp": ERROR,
270
- "require-yield": ERROR,
271
- "sort-imports": OFF, /* preference */
272
- "sort-keys": OFF, /* preference */
273
- "sort-vars": OFF, /* preference */
274
- strict: OFF, /* preference */
275
- "symbol-description": OFF, /* preference */
276
- "vars-on-top": ERROR,
277
- yoda: [ERROR, Never, { exceptRange: false, onlyEquality: false }],
278
-
279
- // #endregion
280
-
281
- // #region Layout & Formatting
282
- // [ https://eslint.org/docs/latest/rules/#layout--formatting ]
283
- "unicode-bom": OFF, /* preference: don't care */
284
-
285
- // #endregion
286
- },
287
- ] as const;
@@ -1,294 +0,0 @@
1
- import { id, level, state } from "../_strings.js";
2
-
3
- const
4
- { stylistic } = id,
5
- { ERROR, OFF } = level,
6
- {
7
- Never,
8
- Always,
9
- AlwaysMultiline,
10
- Consistent,
11
- AsNeeded,
12
- Strict,
13
- All,
14
- Star,
15
- Last,
16
- Before,
17
- After,
18
- Below,
19
- Beside,
20
- Inside,
21
- Double,
22
- } = state;
23
-
24
- export default [
25
- stylistic,
26
- {
27
- // https://eslint.style/rules
28
- "@stylistic/array-bracket-newline": [ERROR, { multiline: true, minItems: null }],
29
- "@stylistic/array-bracket-spacing": [ERROR, Never, { singleValue: false, objectsInArrays: false, arraysInArrays: false }],
30
- "@stylistic/array-element-newline": [
31
- ERROR,
32
- {
33
- ArrayExpression: { consistent: true, multiline: true, minItems: 4 },
34
- ArrayPattern: { consistent: true, multiline: true, minItems: 4 },
35
- },
36
- ],
37
- "@stylistic/arrow-parens": [ERROR, AsNeeded, { requireForBlockBody: false }],
38
- "@stylistic/arrow-spacing": [ERROR, { before: true, after: true }],
39
- "@stylistic/block-spacing": [ERROR, Always],
40
- "@stylistic/brace-style": [ERROR, "stroustrup", { allowSingleLine: true }],
41
- "@stylistic/comma-dangle": [ERROR, AlwaysMultiline],
42
- "@stylistic/comma-spacing": [ERROR, { before: false, after: true }],
43
- "@stylistic/comma-style": [
44
- ERROR,
45
- Last,
46
- {
47
- exceptions: {
48
- ArrayExpression: false,
49
- ArrayPattern: false,
50
- ArrowFunctionExpression: false,
51
- CallExpression: false,
52
- FunctionDeclaration: false,
53
- FunctionExpression: false,
54
- ImportDeclaration: false,
55
- ObjectExpression: false,
56
- ObjectPattern: false,
57
- VariableDeclaration: false,
58
- NewExpression: false,
59
- },
60
- },
61
- ],
62
- "@stylistic/computed-property-spacing": [ERROR, Never, { enforceForClassMembers: true }],
63
- "@stylistic/dot-location": [ERROR, "property"],
64
- "@stylistic/eol-last": [ERROR, Always],
65
- "@stylistic/function-call-argument-newline": [ERROR, Consistent],
66
- "@stylistic/function-call-spacing": [ERROR, Never],
67
-
68
- "@stylistic/function-paren-newline": [ERROR, "multiline-arguments"], // BUG: https://github.com/eslint-stylistic/eslint-stylistic/issues/290
69
- "@stylistic/generator-star-spacing": [ERROR, { before: true, after: false }],
70
- "@stylistic/implicit-arrow-linebreak": [ERROR, Beside],
71
- "@stylistic/indent": [
72
- ERROR,
73
- 2,
74
- {
75
- ignoredNodes: [],
76
- SwitchCase: 1,
77
- VariableDeclarator: { "var": 0, let: 0, "const": 0 },
78
- outerIIFEBody: 0,
79
- MemberExpression: 1,
80
- FunctionDeclaration: { parameters: 1, body: 1 },
81
- FunctionExpression: { parameters: 1, body: 1 },
82
- StaticBlock: { body: 1 },
83
- CallExpression: { arguments: 1 },
84
- ArrayExpression: 1,
85
- ObjectExpression: 1,
86
- ImportDeclaration: 1,
87
- flatTernaryExpressions: false,
88
- offsetTernaryExpressions: true,
89
- ignoreComments: false,
90
- },
91
- ],
92
- "@stylistic/indent-binary-ops": [ERROR, 2],
93
- "@stylistic/key-spacing": [ERROR, { beforeColon: false, afterColon: true, mode: Strict }],
94
- "@stylistic/keyword-spacing": [ERROR, { before: true, after: true, overrides: {} }],
95
- "@stylistic/line-comment-position": OFF,
96
- "@stylistic/lines-around-comment": [
97
- ERROR,
98
- {
99
- beforeBlockComment: false,
100
- afterBlockComment: false,
101
- beforeLineComment: true,
102
- afterLineComment: false,
103
- allowBlockStart: true,
104
- allowBlockEnd: true,
105
- allowObjectStart: true,
106
- allowObjectEnd: true,
107
- allowArrayStart: true,
108
- allowArrayEnd: true,
109
- allowClassStart: true,
110
- allowClassEnd: true,
111
- applyDefaultIgnorePatterns: true,
112
- afterHashbangComment: false,
113
-
114
- /* TS-only */
115
- allowEnumEnd: true,
116
- allowEnumStart: true,
117
- allowInterfaceEnd: true,
118
- allowInterfaceStart: true,
119
- allowModuleEnd: true,
120
- allowModuleStart: true,
121
- allowTypeEnd: true,
122
- allowTypeStart: true,
123
- },
124
- ],
125
- "@stylistic/lines-between-class-members": [
126
- ERROR,
127
- {
128
- enforce: [
129
- { blankLine: Never, prev: "field", next: "field" },
130
- { blankLine: Always, prev: "field", next: "method" },
131
- { blankLine: Always, prev: "method", next: Star },
132
- ],
133
- },
134
- { exceptAfterSingleLine: false, exceptAfterOverload: true /* TS-only */ },
135
- ],
136
- "@stylistic/max-len": [
137
- ERROR,
138
- {
139
- code: 150,
140
- tabWidth: 2,
141
- ignoreComments: true,
142
- ignoreTrailingComments: true,
143
- ignoreUrls: true,
144
- ignoreStrings: true,
145
- ignoreTemplateLiterals: true,
146
- ignoreRegExpLiterals: true,
147
- },
148
- ],
149
- "@stylistic/max-statements-per-line": [ERROR, { max: 1 }],
150
- "@stylistic/member-delimiter-style": [
151
- ERROR,
152
- {
153
- multiline: { delimiter: "semi", requireLast: true },
154
- singleline: { delimiter: "semi", requireLast: false },
155
- multilineDetection: "brackets",
156
- },
157
- ],
158
- "@stylistic/multiline-comment-style": OFF,
159
- "@stylistic/multiline-ternary": [ERROR, AlwaysMultiline],
160
- "@stylistic/new-parens": [OFF, Never],
161
- "@stylistic/newline-per-chained-call": [ERROR, { ignoreChainWithDepth: 2 }],
162
- "@stylistic/no-confusing-arrow": OFF,
163
- "@stylistic/no-extra-parens": [
164
- ERROR,
165
- All,
166
- {
167
- conditionalAssign: true,
168
- returnAssign: true,
169
- nestedBinaryExpressions: true,
170
- ternaryOperandBinaryExpressions: true,
171
- enforceForArrowConditionals: true,
172
- enforceForSequenceExpressions: true,
173
- enforceForNewInMemberExpressions: true,
174
- enforceForFunctionPrototypeMethods: true,
175
- },
176
- ],
177
- "@stylistic/no-extra-semi": ERROR,
178
- "@stylistic/no-floating-decimal": ERROR,
179
- "@stylistic/no-mixed-operators": OFF,
180
- "@stylistic/no-mixed-spaces-and-tabs": ERROR,
181
- "@stylistic/no-multi-spaces": [ERROR, { ignoreEOLComments: false, exceptions: { Property: false }, includeTabs: true }],
182
- "@stylistic/no-multiple-empty-lines": [ERROR, { max: 1, maxEOF: 1, maxBOF: 0 }],
183
- "@stylistic/no-tabs": [ERROR, { allowIndentationTabs: false }],
184
- "@stylistic/no-trailing-spaces": [ERROR, { skipBlankLines: false, ignoreComments: false }],
185
- "@stylistic/no-whitespace-before-property": ERROR,
186
- "@stylistic/nonblock-statement-body-position": [
187
- ERROR,
188
- Below,
189
- {
190
- overrides: {
191
- "if": Below,
192
- "else": Below,
193
- "while": Below,
194
- "do": Below,
195
- "for": Below,
196
- },
197
- },
198
- ],
199
- "@stylistic/object-curly-newline": [
200
- ERROR,
201
- {
202
- ObjectExpression: { consistent: true, multiline: true, minProperties: 4 },
203
- ObjectPattern: { consistent: true, multiline: true, minProperties: 4 },
204
- ImportDeclaration: { consistent: true, multiline: true, minProperties: 4 },
205
- ExportDeclaration: { consistent: true, multiline: true, minProperties: 4 },
206
- },
207
- ],
208
- "@stylistic/object-curly-spacing": [ERROR, Always, { arraysInObjects: true, objectsInObjects: true }],
209
- "@stylistic/object-property-newline": [ERROR, { allowAllPropertiesOnSameLine: true }],
210
- "@stylistic/one-var-declaration-per-line": [ERROR, Always],
211
- "@stylistic/operator-linebreak": [ERROR, Before, { overrides: { "=": After } }],
212
- "@stylistic/padded-blocks": [ERROR, { blocks: Never, classes: Never, switches: Never }, { allowSingleLineBlocks: true }],
213
- "@stylistic/padding-line-between-statements": [
214
- ERROR,
215
- { blankLine: Always, prev: "directive", next: Star },
216
- { blankLine: Never, prev: "directive", next: "directive" },
217
- { blankLine: Always, prev: ["import", "cjs-import"], next: Star },
218
- { blankLine: Never, prev: ["import", "cjs-import"], next: ["import", "cjs-import"] },
219
- {
220
- blankLine: Always,
221
- prev: [
222
- "class",
223
- "interface",
224
- "try",
225
- "for",
226
- "if",
227
- "do",
228
- "while",
229
- "switch",
230
- "block",
231
- "block-like",
232
- "iife",
233
- "empty",
234
- "debugger",
235
- "with",
236
- ],
237
- next: Star,
238
- },
239
- { blankLine: Always, prev: "case", next: Star },
240
- { blankLine: Always, prev: "case", next: ["case", "default"] },
241
- { blankLine: Always, prev: "default", next: Star },
242
- { blankLine: Always, prev: "type", next: Star },
243
- { blankLine: Never, prev: "type", next: "type" },
244
- { blankLine: Always, prev: "function", next: Star },
245
- { blankLine: Always, prev: "function-overload", next: Star },
246
- { blankLine: Never, prev: "function-overload", next: "function-overload" },
247
- { blankLine: Never, prev: "function-overload", next: "function" },
248
- { blankLine: Always, prev: ["const", "let", "var"], next: Star },
249
- { blankLine: Never, prev: ["const", "let", "var"], next: ["const", "let", "var"] },
250
- { blankLine: Always, prev: "expression", next: Star },
251
- { blankLine: Never, prev: "expression", next: "expression" },
252
- {
253
- blankLine: Always,
254
- prev: Star,
255
- next: [
256
- "throw",
257
- "return",
258
- "break",
259
- "continue",
260
- ],
261
- },
262
- { blankLine: Always, prev: Star, next: ["export", "cjs-export"] },
263
- { blankLine: Never, prev: ["export", "cjs-export"], next: ["export", "cjs-export"] },
264
- ],
265
- "@stylistic/quote-props": [ERROR, AsNeeded, { keywords: true, unnecessary: true, numbers: false }],
266
- "@stylistic/quotes": [ERROR, Double, { avoidEscape: true, allowTemplateLiterals: true }],
267
- "@stylistic/rest-spread-spacing": [ERROR, Never],
268
- "@stylistic/semi": [ERROR, Always, { omitLastInOneLineBlock: false, omitLastInOneLineClassBody: false }],
269
- "@stylistic/semi-spacing": [ERROR, { before: false, after: true }],
270
- "@stylistic/semi-style": [ERROR, Last],
271
- "@stylistic/space-before-blocks": [ERROR, { functions: Always, keywords: Always, classes: Always }],
272
- "@stylistic/space-before-function-paren": [ERROR, { anonymous: Always, named: Never, asyncArrow: Always }],
273
- "@stylistic/space-in-parens": [ERROR, Never],
274
- "@stylistic/space-infix-ops": [ERROR, { int32Hint: true }],
275
- "@stylistic/space-unary-ops": [ERROR, { words: true, nonwords: false, overrides: {} }],
276
- "@stylistic/spaced-comment": [ERROR, Always],
277
- "@stylistic/switch-colon-spacing": [ERROR, { after: true, before: false }],
278
- "@stylistic/template-curly-spacing": [ERROR, Never],
279
- "@stylistic/template-tag-spacing": [ERROR, Never],
280
- "@stylistic/type-annotation-spacing": [
281
- ERROR,
282
- {
283
- before: true,
284
- after: true,
285
- overrides: { colon: { before: false, after: true } },
286
- } /* non-overriden rule affects all type annotations (arrows, "as" keyword, "satisfies" keyword) except colons */,
287
- ],
288
- "@stylistic/type-generic-spacing": ERROR,
289
- "@stylistic/type-named-tuple-spacing": ERROR,
290
- "@stylistic/wrap-iife": [ERROR, Inside, { functionPrototypeMethods: true }],
291
- "@stylistic/wrap-regex": ERROR,
292
- "@stylistic/yield-star-spacing": [ERROR, { before: false, after: true }],
293
- },
294
- ] as const;
@@ -1,14 +0,0 @@
1
- import { id, level } from "../_strings.js";
2
-
3
- const
4
- { enable } = id,
5
- { ERROR } = level;
6
-
7
- export default [
8
- enable,
9
- {
10
- // Rules 1-50 supported by this shit plugin: https://gitlab.com/pawelbbdrozd/eslint-plugin-markdownlint/-/tree/main/lib/rules?ref_type=heads
11
- // Rules 1-56 supported by this good plugin: https://github.com/DavidAnson/markdownlint/blob/main/doc/md001.md
12
- "markdownlint/md003": [ERROR, { style: "atx" }],
13
- },
14
- ] as const;
@@ -1,5 +0,0 @@
1
- import { id } from "../_strings.js";
2
-
3
- const { enable } = id;
4
-
5
- export default [enable, {}] as const;
@@ -1,7 +0,0 @@
1
- import { id } from "../_strings.js";
2
- import mocha from "eslint-plugin-mocha";
3
-
4
- const { recommended } = id;
5
-
6
- // Remove shared config once manually configured
7
- export default [recommended, (mocha.configs.flat.recommended as Record<"rules", Record<string, "off">>).rules] as const;
@@ -1,8 +0,0 @@
1
- import { id, level } from "../_strings.js";
2
-
3
- const
4
- { disable_x } = id,
5
- { OFF } = level;
6
-
7
- // http://sveltejs.github.io/eslint-plugin-svelte/rules/#extension-rules
8
- export default [disable_x, { "no-inner-declarations": OFF /* also disabled in SvelteDisableConflictJs per Svelte base config */ }] as const;