@pumpn/eslint-config 17.2.3 → 18.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 (209) hide show
  1. package/_common/_exports.js +5 -0
  2. package/_common/all-extensions/_exports.js +1 -0
  3. package/_common/all-extensions/js-extensions.js +10 -0
  4. package/_common/all-extensions.js +6 -0
  5. package/_common/convert-extensions-to-glob.js +12 -0
  6. package/_common/js-jsx-extensions.js +3 -0
  7. package/_common/ts-extensions.js +10 -0
  8. package/_common/ts-jsx-extensions.js +3 -0
  9. package/config/_common/_exports.js +5 -0
  10. package/config/_common/add-prefix-to-rules.js +13 -0
  11. package/config/_common/core-json-rules.js +24 -0
  12. package/config/_common/json-plugins.js +9 -0
  13. package/config/_common/pick-unicorn-rules-for-language/_exports.js +2 -0
  14. package/config/_common/pick-unicorn-rules-for-language/pick-rules-for-language.js +52 -0
  15. package/config/_common/pick-unicorn-rules-for-language/unicorn/_exports.js +9 -0
  16. package/config/_common/pick-unicorn-rules-for-language/unicorn/binary-group-length.js +3 -0
  17. package/config/_common/pick-unicorn-rules-for-language/unicorn/hexadecimal-group-length.js +3 -0
  18. package/config/_common/pick-unicorn-rules-for-language/unicorn/maximum-nested-calls.js +3 -0
  19. package/config/_common/pick-unicorn-rules-for-language/unicorn/number-group-length.js +3 -0
  20. package/config/_common/pick-unicorn-rules-for-language/unicorn/octal-group-length.js +3 -0
  21. package/config/_common/pick-unicorn-rules-for-language/unicorn/patterns.js +28 -0
  22. package/config/_common/pick-unicorn-rules-for-language/unicorn/unicorn-consistency-rules/_exports.js +1 -0
  23. package/config/_common/pick-unicorn-rules-for-language/unicorn/unicorn-consistency-rules/consistent-function-style.js +3 -0
  24. package/config/_common/pick-unicorn-rules-for-language/unicorn/unicorn-consistency-rules.js +66 -0
  25. package/config/_common/pick-unicorn-rules-for-language/unicorn/unicorn-preference-rules.js +199 -0
  26. package/config/_common/pick-unicorn-rules-for-language/unicorn/unicorn-redundancy-rules.js +47 -0
  27. package/config/_common/pick-unicorn-rules-for-language/unicorn.js +368 -0
  28. package/config/_common/pick-unicorn-rules-for-language.js +14 -0
  29. package/config/_exports.js +11 -0
  30. package/config/converted-globals.js +16 -0
  31. package/config/css-config/_exports.js +2 -0
  32. package/config/css-config/css-plugins.js +9 -0
  33. package/config/css-config/css-rules/_exports.js +1 -0
  34. package/config/css-config/css-rules/core-css-rules.js +25 -0
  35. package/config/css-config/css-rules.js +10 -0
  36. package/config/css-config.js +17 -0
  37. package/config/default-glob.js +6 -0
  38. package/config/html-config/_exports.js +2 -0
  39. package/config/html-config/html-plugins.js +9 -0
  40. package/config/html-config/html-rules/_exports.js +1 -0
  41. package/config/html-config/html-rules/core-html-rules/_exports.js +4 -0
  42. package/config/html-config/html-rules/core-html-rules/core-html-accessibility-rules.js +28 -0
  43. package/config/html-config/html-rules/core-html-rules/core-html-best-practice-rules.js +42 -0
  44. package/config/html-config/html-rules/core-html-rules/core-html-seo-rules.js +16 -0
  45. package/config/html-config/html-rules/core-html-rules/core-html-style-rules.js +23 -0
  46. package/config/html-config/html-rules/core-html-rules.js +27 -0
  47. package/config/html-config/html-rules.js +10 -0
  48. package/config/html-config.js +12 -0
  49. package/config/json-config/_exports.js +1 -0
  50. package/config/json-config/json-rules.js +9 -0
  51. package/config/json-config.js +13 -0
  52. package/config/jsonc-config/_exports.js +1 -0
  53. package/config/jsonc-config/jsonc-rules.js +9 -0
  54. package/config/jsonc-config.js +26 -0
  55. package/config/jsx-glob/_exports.js +1 -0
  56. package/config/jsx-glob/jsx-extensions.js +6 -0
  57. package/config/jsx-glob.js +7 -0
  58. package/config/md-config/_exports.js +2 -0
  59. package/config/md-config/md-plugins.js +9 -0
  60. package/config/md-config/md-rules/_exports.js +1 -0
  61. package/config/md-config/md-rules/core-md-rules.js +30 -0
  62. package/config/md-config/md-rules.js +10 -0
  63. package/config/md-config.js +15 -0
  64. package/{plugins.js → config/plugins.js} +7 -6
  65. package/{rules → config/rules}/_common/_exports.js +0 -1
  66. package/{rules → config/rules}/_exports.js +1 -4
  67. package/config/rules/better-tailwindcss/correctness.js +13 -0
  68. package/config/rules/better-tailwindcss/stylistic.js +42 -0
  69. package/config/rules/better-tailwindcss.js +15 -0
  70. package/config/rules/command.js +17 -0
  71. package/config/rules/depend.js +17 -0
  72. package/config/rules/eslint-comments/best-practices.js +14 -0
  73. package/config/rules/eslint-comments/stylistic-issues.js +17 -0
  74. package/config/rules/eslint-comments.js +15 -0
  75. package/config/rules/import-x/helpful-warnings.js +26 -0
  76. package/config/rules/import-x/module-systems.js +14 -0
  77. package/config/rules/import-x/static-analysis.js +40 -0
  78. package/config/rules/import-x/style-guide/_exports.js +1 -0
  79. package/config/rules/import-x/style-guide/max-dependencies.js +3 -0
  80. package/config/rules/import-x/style-guide.js +94 -0
  81. package/config/rules/import-x.js +22 -0
  82. package/config/rules/jsdoc.js +464 -0
  83. package/config/rules/no-secrets/_exports.js +1 -0
  84. package/config/rules/no-secrets/tolerance.js +3 -0
  85. package/config/rules/no-secrets.js +30 -0
  86. package/config/rules/perfectionist.js +331 -0
  87. package/config/rules/promise.js +53 -0
  88. package/config/rules/react/core.js +69 -0
  89. package/config/rules/react/debug.js +14 -0
  90. package/config/rules/react/dom.js +25 -0
  91. package/config/rules/react/jsx.js +23 -0
  92. package/config/rules/react/naming-convention.js +12 -0
  93. package/config/rules/react/rsc.js +10 -0
  94. package/config/rules/react/web-api.js +15 -0
  95. package/config/rules/react.js +28 -0
  96. package/config/rules/regexp/best-practices.js +47 -0
  97. package/config/rules/regexp/possible-errors.js +31 -0
  98. package/config/rules/regexp/stylistic-issues.js +79 -0
  99. package/config/rules/regexp.js +20 -0
  100. package/config/rules/security.js +31 -0
  101. package/config/rules/sonarjs/problem.js +134 -0
  102. package/config/rules/sonarjs/suggestion.js +167 -0
  103. package/config/rules/sonarjs.js +15 -0
  104. package/config/rules/stylistic/_common/_exports.js +1 -0
  105. package/{rules → config/rules}/stylistic/_exports.js +1 -1
  106. package/config/rules/stylistic/brackets/_exports.js +2 -0
  107. package/config/rules/stylistic/brackets/min-elements-for-curly-newline.js +3 -0
  108. package/config/rules/stylistic/brackets/wrap-multilines-default.js +3 -0
  109. package/config/rules/stylistic/brackets.js +90 -0
  110. package/config/rules/stylistic/commas.js +18 -0
  111. package/config/rules/stylistic/comments.js +13 -0
  112. package/config/rules/stylistic/disallow.js +36 -0
  113. package/config/rules/stylistic/indent.js +19 -0
  114. package/config/rules/stylistic/jsx.js +42 -0
  115. package/config/rules/stylistic/linebreaks/_exports.js +1 -0
  116. package/config/rules/stylistic/linebreaks/max-ignored-chain-depth.js +3 -0
  117. package/config/rules/stylistic/linebreaks.js +67 -0
  118. package/config/rules/stylistic/misc.js +49 -0
  119. package/config/rules/stylistic/operators.js +31 -0
  120. package/config/rules/stylistic/quotes.js +12 -0
  121. package/config/rules/stylistic/semis.js +19 -0
  122. package/config/rules/stylistic/spacing.js +68 -0
  123. package/config/rules/stylistic/types.js +12 -0
  124. package/config/rules/stylistic.js +40 -0
  125. package/config/rules/suggestions/_exports.js +9 -0
  126. package/config/rules/suggestions/max-classes-per-file.js +3 -0
  127. package/config/rules/suggestions/max-depth.js +3 -0
  128. package/config/rules/suggestions/max-identifier-length.js +3 -0
  129. package/config/rules/suggestions/max-lines-per-file.js +3 -0
  130. package/config/rules/suggestions/max-lines-per-function.js +3 -0
  131. package/config/rules/suggestions/max-nested-callbacks.js +3 -0
  132. package/config/rules/suggestions/max-parameters.js +3 -0
  133. package/config/rules/suggestions/max-statements.js +3 -0
  134. package/config/rules/suggestions/min-identifier-length.js +3 -0
  135. package/{rules → config/rules}/suggestions.js +17 -15
  136. package/config/rules.js +50 -0
  137. package/config/ts-glob.js +6 -0
  138. package/config.js +51 -53
  139. package/package.json +51 -38
  140. package/.ls-lint.yml +0 -6
  141. package/.vscode/settings.json +0 -18
  142. package/deno.json +0 -78
  143. package/deno.lock +0 -1632
  144. package/eslint.config.js +0 -25
  145. package/rules/better-tailwindcss/correctness.js +0 -7
  146. package/rules/better-tailwindcss/stylistic.js +0 -38
  147. package/rules/better-tailwindcss.js +0 -19
  148. package/rules/command.js +0 -12
  149. package/rules/depend.js +0 -12
  150. package/rules/eslint-comments/best-practices.js +0 -9
  151. package/rules/eslint-comments/stylistic-issues.js +0 -12
  152. package/rules/eslint-comments.js +0 -19
  153. package/rules/import-x/helpful-warnings.js +0 -21
  154. package/rules/import-x/module-systems.js +0 -9
  155. package/rules/import-x/static-analysis.js +0 -35
  156. package/rules/import-x/style-guide.js +0 -89
  157. package/rules/import-x.js +0 -19
  158. package/rules/jsdoc.js +0 -433
  159. package/rules/no-secrets.js +0 -25
  160. package/rules/perfectionist.js +0 -318
  161. package/rules/promise.js +0 -48
  162. package/rules/react/core.js +0 -59
  163. package/rules/react/debug.js +0 -6
  164. package/rules/react/dom.js +0 -15
  165. package/rules/react/jsx.js +0 -18
  166. package/rules/react/naming-convention.js +0 -6
  167. package/rules/react/rsc.js +0 -5
  168. package/rules/react/web-api.js +0 -10
  169. package/rules/react.js +0 -19
  170. package/rules/regexp/best-practices.js +0 -42
  171. package/rules/regexp/possible-errors.js +0 -26
  172. package/rules/regexp/stylistic-issues.js +0 -74
  173. package/rules/regexp.js +0 -19
  174. package/rules/security.js +0 -25
  175. package/rules/sonarjs/problem.js +0 -123
  176. package/rules/sonarjs/suggestion.js +0 -135
  177. package/rules/sonarjs.js +0 -19
  178. package/rules/stylistic/_common/_exports.js +0 -3
  179. package/rules/stylistic/brackets.js +0 -87
  180. package/rules/stylistic/commas.js +0 -13
  181. package/rules/stylistic/comments.js +0 -8
  182. package/rules/stylistic/disallow.js +0 -31
  183. package/rules/stylistic/indent.js +0 -14
  184. package/rules/stylistic/jsx.js +0 -37
  185. package/rules/stylistic/linebreaks.js +0 -63
  186. package/rules/stylistic/misc.js +0 -45
  187. package/rules/stylistic/operators.js +0 -26
  188. package/rules/stylistic/quotes.js +0 -7
  189. package/rules/stylistic/semis.js +0 -14
  190. package/rules/stylistic/spacing.js +0 -63
  191. package/rules/stylistic/types.js +0 -7
  192. package/rules/stylistic.js +0 -19
  193. package/rules/unicorn.js +0 -306
  194. package/rules.js +0 -19
  195. package/scripts/update-import-map.js +0 -47
  196. package/scripts/update-package-json.js +0 -66
  197. package/scripts/update-tsconfig.js +0 -46
  198. package/tsconfig.json +0 -27
  199. /package/{rules → config}/_common/tab-width.js +0 -0
  200. /package/{rules → config/rules}/_common/maximum-line-length.js +0 -0
  201. /package/{rules → config/rules}/better-tailwindcss/_exports.js +0 -0
  202. /package/{rules → config/rules}/eslint-comments/_exports.js +0 -0
  203. /package/{rules → config/rules}/import-x/_exports.js +0 -0
  204. /package/{rules → config/rules}/layout-and-formatting.js +0 -0
  205. /package/{rules → config/rules}/possible-problems.js +0 -0
  206. /package/{rules → config/rules}/react/_exports.js +0 -0
  207. /package/{rules → config/rules}/regexp/_exports.js +0 -0
  208. /package/{rules → config/rules}/sonarjs/_exports.js +0 -0
  209. /package/{rules → config/rules}/stylistic/_common/min-items-for-array-newline.js +0 -0
@@ -0,0 +1,368 @@
1
+ import addPrefixToRules from "../add-prefix-to-rules.js";
2
+ import tabWidth from "../tab-width.js";
3
+
4
+ import {
5
+ binaryGroupLength,
6
+ hexadecimalGroupLength,
7
+ maximumNestedCalls,
8
+ numberGroupLength,
9
+ octalGroupLength,
10
+ patterns,
11
+ unicornConsistencyRules,
12
+ unicornPreferenceRules,
13
+ unicornRedundancyRules
14
+ } from "./unicorn/_exports.js";
15
+
16
+ /**
17
+ * @import { Linter } from "eslint";
18
+ */
19
+
20
+ /**
21
+ * @satisfies {Linter.RulesRecord}
22
+ */
23
+ const unicornRules = addPrefixToRules(
24
+ "unicorn",
25
+ {
26
+ ...unicornConsistencyRules,
27
+ ...unicornRedundancyRules,
28
+ ...unicornPreferenceRules,
29
+ "max-nested-calls": ["error", { max: maximumNestedCalls }],
30
+ "better-dom-traversing": "error",
31
+ "catch-error-name": "error",
32
+ "class-reference-in-static-methods": [
33
+ "error",
34
+ {
35
+ preferSuper: false,
36
+ preferThis: false
37
+ }
38
+ ],
39
+ "comma-spacing": "off",
40
+ "comment-content": [
41
+ "error",
42
+ {
43
+ checkUniformCase: true,
44
+ extendDefaultReplacements: true,
45
+ ignore: [],
46
+ replacements: {}
47
+ }
48
+ ],
49
+
50
+ "custom-error-definition": "error",
51
+ "default-export-style": [
52
+ "error",
53
+ {
54
+ classes: "separate",
55
+ functions: "separate"
56
+ }
57
+ ],
58
+ "dom-node-dataset": "error",
59
+ "empty-brace-spaces": "error",
60
+ "error-message": "error",
61
+ "escape-case": ["error", "uppercase"],
62
+ "expiring-todo-comments": [
63
+ "error",
64
+ {
65
+ allowWarningComments: false,
66
+ checkDates: true,
67
+ terms: ["todo", "fixme"]
68
+ }
69
+ ],
70
+ "explicit-length-check": "error",
71
+ "explicit-timer-delay": ["error", "always"],
72
+ "filename-case": [
73
+ "error",
74
+ {
75
+ case: "kebabCase",
76
+ directoryRoots: [],
77
+ ignore: [/\(_[_a-z][\-_a-z]*\)/v]
78
+ }
79
+ ],
80
+ "id-match": "error",
81
+ "import-style": "error",
82
+ indent: [
83
+ "error",
84
+ {
85
+ indent: "tab",
86
+ tabWidth
87
+ }
88
+ ],
89
+ "isolated-functions": [
90
+ "error",
91
+ {
92
+ comments: ["@isolated"],
93
+ functions: ["makeSynchronous"],
94
+ overrideGlobals: undefined,
95
+ selectors: []
96
+ }
97
+ ],
98
+ "iteration-fallback-style": ["error", "guard"],
99
+ "key-name-casing": [
100
+ "off",
101
+ {
102
+ camelCase: true,
103
+ ignore: []
104
+ }
105
+ ],
106
+ "logical-assignment-operators": "error",
107
+ "name-replacements": [
108
+ "error",
109
+ {
110
+ allowList: {},
111
+ checkDefaultAndNamespaceImports: true,
112
+ checkFilenames: true,
113
+ checkProperties: false,
114
+ checkShorthandImports: true,
115
+ checkShorthandProperties: true,
116
+ checkVariables: true,
117
+ extendDefaultAllowList: true,
118
+ extendDefaultReplacements: true,
119
+ ignore: [],
120
+ replacements: {}
121
+ }
122
+ ],
123
+ "new-for-builtins": "error",
124
+ "no-abusive-eslint-disable": "error",
125
+ "no-accessor-recursion": "error",
126
+ "no-accidental-bitwise-operator": "error",
127
+ "no-anonymous-default-export": "error",
128
+ "no-array-callback-reference": "off",
129
+ "no-array-concat-in-loop": "error",
130
+ "no-array-fill-with-reference-type": "error",
131
+ "no-array-from-fill": "error",
132
+ "no-array-front-mutation": "error",
133
+ "no-array-method-this-argument": "error",
134
+ "no-array-reduce": "off",
135
+ "no-array-reverse": "error",
136
+ "no-array-sort": "off",
137
+ "no-array-sort-for-min-max": "error",
138
+ "no-array-splice": "error",
139
+ "no-asterisk-prefix-in-documentation-comments": "off",
140
+ "no-async-iterator-callback": "error",
141
+ "no-async-promise-finally": "error",
142
+ "no-await-expression-member": "error",
143
+ "no-await-in-promise-methods": "error",
144
+ "no-barrel-files": "off",
145
+ "no-blob-to-file": "error",
146
+ "no-boolean-sort-comparator": "error",
147
+ "no-break-in-nested-loop": ["error", { checkContinue: true }],
148
+ "no-canvas-to-image": "error",
149
+ "no-chained-comparison": "error",
150
+ "no-collection-bracket-access": "error",
151
+ "no-computed-property-existence-check": "error",
152
+ "no-conflicting-constraints": "error",
153
+ "no-confusing-array-splice": "error",
154
+ "no-confusing-array-with": "error",
155
+ "no-console-spaces": "error",
156
+ "no-constant-zero-expression": "error",
157
+ "no-declarations-before-early-exit": "error",
158
+ "no-document-cookie": "error",
159
+ "no-double-comparison": "error",
160
+ "no-duplicate-if-branches": "error",
161
+ "no-duplicate-logical-operands": "error",
162
+ "no-duplicate-loops": "error",
163
+ "no-duplicate-set-values": "error",
164
+ "no-empty-file": ["error", { allowComments: true }],
165
+ "no-empty-link-text": "error",
166
+ "no-error-property-assignment": "error",
167
+ "no-exports-in-scripts": "error",
168
+ "no-for-each": "error",
169
+ "no-for-loop": "error",
170
+ "no-global-object-property-assignment": "error",
171
+ "no-immediate-mutation": ["error", { checkConditionals: true }],
172
+ "no-impossible-length-comparison": "error",
173
+ "no-incomplete-accessor-override": "error",
174
+ "no-incorrect-query-selector": "error",
175
+ "no-incorrect-template-string-interpolation": "error",
176
+ "no-ineffective-csp-directives": "error",
177
+ "no-instanceof-builtins": [
178
+ "error",
179
+ {
180
+ exclude: [],
181
+ include: [],
182
+ strategy: "strict"
183
+ }
184
+ ],
185
+ "no-invalid-argument-count": "error",
186
+ "no-invalid-boolean-attribute-value": "error",
187
+ "no-invalid-character-comparison": "error",
188
+ "no-invalid-dom-token": "error",
189
+ "no-invalid-fetch-options": "error",
190
+ "no-invalid-file-input-accept": "error",
191
+ "no-invalid-integrity": "error",
192
+ "no-invalid-intl-options": "error",
193
+ "no-invalid-property-descriptor": "error",
194
+ "no-invalid-remove-event-listener": "error",
195
+ "no-invalid-response-options": "error",
196
+ "no-invalid-style-set-property": "error",
197
+ "no-invalid-temporal-arithmetic": "error",
198
+ "no-invalid-url-protocol-comparison": "error",
199
+ "no-invalid-well-known-symbol-methods": "error",
200
+ "no-javascript-url": "error",
201
+ "no-keyword-prefix": [
202
+ "error",
203
+ {
204
+ disallowedPrefixes: ["new"],
205
+ onlyCamelCase: true
206
+ }
207
+ ],
208
+ "no-late-current-target-access": "error",
209
+ "no-late-event-control": "error",
210
+ "no-leading-empty-lines": "error",
211
+ "no-lonely-if": "error",
212
+ "no-loop-iterable-mutation": "error",
213
+ "no-loss-of-precision": "error",
214
+ "no-magic-array-flat-depth": "error",
215
+ "no-manually-wrapped-comments": "error",
216
+ "no-mismatched-map-key": "error",
217
+ "no-misrefactored-assignment": "error",
218
+ "no-missing-local-resource": "error",
219
+ "no-multiple-promise-resolver-calls": "error",
220
+ "no-named-default": "error",
221
+ "no-negated-array-predicate": "error",
222
+ "no-negated-comparison": ["error", { checkLogicalExpressions: true }],
223
+ "no-negated-condition": "error",
224
+ "no-negation-in-equality-check": "error",
225
+ "no-nested-ternary": "error",
226
+ "no-new-array": "error",
227
+ "no-new-buffer": "error",
228
+ "no-non-function-verb-prefix": [
229
+ "error",
230
+ {
231
+ ignore: [],
232
+ verbs: [
233
+ "get",
234
+ "set",
235
+ "unset",
236
+ "delete",
237
+ "add",
238
+ "remove",
239
+ "destroy",
240
+ "create"
241
+ ]
242
+ }
243
+ ],
244
+ "no-nonstandard-builtin-properties": "error",
245
+ "no-null": "off",
246
+ "no-object-as-default-parameter": "error",
247
+ "no-object-methods-with-collections": "error",
248
+ "no-optional-chaining-on-undeclared-variable": "error",
249
+ "no-prevent-default-in-passive-listener": "error",
250
+ "no-process-exit": "error",
251
+ "no-redundant-comparison": "error",
252
+ "no-repeated-call-wrappers": "error",
253
+ "no-return-array-push": "error",
254
+ "no-selector-as-dom-name": "error",
255
+ "no-shorthand-property-overrides": "error",
256
+ "no-single-promise-in-promise-methods": "error",
257
+ "no-static-only-class": "error",
258
+ "no-subtraction-comparison": "error",
259
+ "no-thenable": "error",
260
+ "no-this-assignment": "error",
261
+ "no-this-outside-of-class": "error",
262
+ "no-top-level-assignment-in-function": "error",
263
+ "no-top-level-side-effects": [
264
+ "error",
265
+ {
266
+ allow: {},
267
+ checkUnknownCalls: false
268
+ }
269
+ ],
270
+ "no-transition-all": "error",
271
+ "no-typeof-undefined": "error",
272
+ "no-uncalled-method": "error",
273
+ "no-undeclared-class-members": "error",
274
+
275
+ "no-unreadable-array-destructuring": "error",
276
+ "no-unreadable-for-of-expression": "error",
277
+ "no-unreadable-iife": "error",
278
+ "no-unreadable-new-expression": "error",
279
+ "no-unreadable-object-destructuring": "off",
280
+ "no-unsafe-buffer-conversion": "error",
281
+ "no-unsafe-dom-html": "error",
282
+ "no-unsafe-json-serialization": "error",
283
+ "no-unsafe-promise-all-settled-values": "error",
284
+ "no-unsafe-property-key": "error",
285
+ "no-unsafe-sqlite-interpolation": "error",
286
+ "no-unsafe-string-replacement": "error",
287
+ "no-unused-builtin-method-return": "error",
288
+ "no-unused-iterator-helper": "error",
289
+ "no-unused-properties": "error",
290
+ "no-url-in-search-params": "error",
291
+ "no-using-resource-escape": "error",
292
+ "no-xor-as-exponentiation": "error",
293
+ "no-zero-fractions": "error",
294
+ "number-literal-case": [
295
+ "error",
296
+ {
297
+ hexadecimalValue: "uppercase"
298
+ }
299
+ ],
300
+ "numeric-separators-style": [
301
+ "error",
302
+ {
303
+ binary: {
304
+ minimumDigits: 0,
305
+ groupLength: binaryGroupLength
306
+ },
307
+ hexadecimal: {
308
+ minimumDigits: 0,
309
+ groupLength: hexadecimalGroupLength
310
+ },
311
+ number: {
312
+ minimumDigits: 0,
313
+ fractionGroupLength: Infinity,
314
+ groupLength: numberGroupLength
315
+ },
316
+ octal: {
317
+ minimumDigits: 0,
318
+ groupLength: octalGroupLength
319
+ },
320
+ onlyIfContainsSeparator: false
321
+ }
322
+ ],
323
+ "operator-assignment": ["error", "always"],
324
+ "relative-url-style": "error",
325
+ "require-array-join-separator": "error",
326
+ "require-array-sort-compare": "error",
327
+ "require-css-escape": "error",
328
+ "require-frontmatter-fields": ["error", { fields: [] }],
329
+ "require-module-attributes": "error",
330
+ "require-module-specifiers": "error",
331
+ "require-number-to-fixed-digits-argument": "error",
332
+ "require-passive-events": "error",
333
+ "require-post-message-target-origin": "off",
334
+ "require-proxy-trap-boolean-return": "error",
335
+ "require-text-decoder-streaming": "error",
336
+ "single-line-block-comment-style": ["error", "multiline", { ignore: [] }],
337
+ "string-content": [
338
+ "off",
339
+ {
340
+ patterns
341
+ }
342
+ ],
343
+ "switch-case-braces": ["error", "avoid"],
344
+ "switch-case-break-position": "error",
345
+ "template-indent": [
346
+ "error",
347
+ {
348
+ comments: ["HTML", "indent"],
349
+ functions: ["dedent", "stripIndent"],
350
+ indent: "\t",
351
+ selectors: ["TemplateLiteral"],
352
+ tags: [
353
+ "outdent",
354
+ "dedent",
355
+ "gql",
356
+ "sql",
357
+ "html",
358
+ "styled"
359
+ ]
360
+ }
361
+ ],
362
+ "text-encoding-identifier-case": ["error", { withDash: true }],
363
+ "throw-new-error": "error",
364
+ "try-complexity": "error"
365
+ }
366
+ );
367
+
368
+ export default unicornRules;
@@ -0,0 +1,14 @@
1
+ import unicorn from "eslint-plugin-unicorn";
2
+
3
+ import { pickRulesForLanguage, unicornRules } from "./pick-unicorn-rules-for-language/_exports.js";
4
+
5
+ /**
6
+ * @param {string} language
7
+ */
8
+ const pickUnicornRulesForLanguage = (language) => pickRulesForLanguage(
9
+ unicornRules,
10
+ language,
11
+ unicorn
12
+ );
13
+
14
+ export default pickUnicornRulesForLanguage;
@@ -0,0 +1,11 @@
1
+ export { default as convertedGlobals } from "./converted-globals.js";
2
+ export { default as cssConfig } from "./css-config.js";
3
+ export { default as defaultGlob } from "./default-glob.js";
4
+ export { default as htmlConfig } from "./html-config.js";
5
+ export { default as jsonConfig } from "./json-config.js";
6
+ export { default as jsoncConfig } from "./jsonc-config.js";
7
+ export { default as jsxGlob } from "./jsx-glob.js";
8
+ export { default as mdConfig } from "./md-config.js";
9
+ export { default as plugins } from "./plugins.js";
10
+ export { default as rules } from "./rules.js";
11
+ export { default as tsGlob } from "./ts-glob.js";
@@ -0,0 +1,16 @@
1
+ import globals from "globals";
2
+
3
+ const convertedGlobals = Object.fromEntries(
4
+ Object.entries({
5
+ ...globals.browser,
6
+ ...globals.builtin
7
+ })
8
+ .map(([global, isWritable]) => [
9
+ global,
10
+ isWritable
11
+ ? "writable"
12
+ : "readonly"
13
+ ])
14
+ );
15
+
16
+ export default convertedGlobals;
@@ -0,0 +1,2 @@
1
+ export { default as cssPlugins } from "./css-plugins.js";
2
+ export { default as cssRules } from "./css-rules.js";
@@ -0,0 +1,9 @@
1
+ import css from "@eslint/css";
2
+ import unicorn from "eslint-plugin-unicorn";
3
+
4
+ const cssPlugins = /** @type {const} */ ({
5
+ css,
6
+ unicorn
7
+ });
8
+
9
+ export default cssPlugins;
@@ -0,0 +1 @@
1
+ export { default as coreCssRules } from "./core-css-rules.js";
@@ -0,0 +1,25 @@
1
+ import addPrefixToRules from "../../_common/add-prefix-to-rules.js";
2
+
3
+ const coreCssRules = addPrefixToRules(
4
+ "css",
5
+ {
6
+ "font-family-fallbacks": "error",
7
+ "no-duplicate-imports": "error",
8
+ "no-duplicate-keyframe-selectors": "error",
9
+ "no-empty-blocks": "error",
10
+ "no-important": "error",
11
+ "no-invalid-at-rule-placement": "error",
12
+ "no-invalid-at-rules": "error",
13
+ "no-invalid-named-grid-areas": "error",
14
+ "no-invalid-properties": "error",
15
+ "no-unmatchable-selectors": "error",
16
+ "prefer-logical-properties": "error",
17
+ "relative-font-units": "error",
18
+ "selector-complexity": "error",
19
+ // TODO[2026-12-01]: Enable "use-baseline" rule once the RangeError is fixed
20
+ "use-baseline": "off",
21
+ "use-layers": "error"
22
+ }
23
+ );
24
+
25
+ export default coreCssRules;
@@ -0,0 +1,10 @@
1
+ import pickUnicornRulesForLanguage from "../_common/pick-unicorn-rules-for-language.js";
2
+
3
+ import { coreCssRules } from "./css-rules/_exports.js";
4
+
5
+ const cssRules = {
6
+ ...coreCssRules,
7
+ ...pickUnicornRulesForLanguage("css/css")
8
+ };
9
+
10
+ export default cssRules;
@@ -0,0 +1,17 @@
1
+ import { tailwind4 } from "tailwind-csstree";
2
+
3
+ import convertExtensionsToGlob from "../_common/convert-extensions-to-glob.js";
4
+
5
+ import { cssPlugins, cssRules } from "./css-config/_exports.js";
6
+
7
+ const cssConfig = {
8
+ files: [convertExtensionsToGlob([".css"])],
9
+ language: "css/css",
10
+ languageOptions: {
11
+ customSyntax: tailwind4
12
+ },
13
+ plugins: cssPlugins,
14
+ rules: cssRules
15
+ };
16
+
17
+ export default cssConfig;
@@ -0,0 +1,6 @@
1
+ import allExtensions from "../_common/all-extensions.js";
2
+ import convertExtensionsToGlob from "../_common/convert-extensions-to-glob.js";
3
+
4
+ const defaultGlob = convertExtensionsToGlob(allExtensions);
5
+
6
+ export default defaultGlob;
@@ -0,0 +1,2 @@
1
+ export { default as htmlPlugins } from "./html-plugins.js";
2
+ export { default as htmlRules } from "./html-rules.js";
@@ -0,0 +1,9 @@
1
+ import html from "@html-eslint/eslint-plugin";
2
+ import unicorn from "eslint-plugin-unicorn";
3
+
4
+ const htmlPlugins = {
5
+ html,
6
+ unicorn
7
+ };
8
+
9
+ export default htmlPlugins;
@@ -0,0 +1 @@
1
+ export { default as coreHtmlRules } from "./core-html-rules.js";
@@ -0,0 +1,4 @@
1
+ export { default as coreHtmlAccessibilityRules } from "./core-html-accessibility-rules.js";
2
+ export { default as coreHtmlBestPracticeRules } from "./core-html-best-practice-rules.js";
3
+ export { default as coreHtmlSeoRules } from "./core-html-seo-rules.js";
4
+ export { default as coreHtmlStyleRules } from "./core-html-style-rules.js";
@@ -0,0 +1,28 @@
1
+ /**
2
+ * @import { Linter } from "eslint";
3
+ */
4
+
5
+ /**
6
+ * @satisfies {Linter.RulesRecord}
7
+ */
8
+ const coreHtmlAccessibilityRules = {
9
+ "no-abstract-roles": "error",
10
+ "no-accesskey-attrs": "error",
11
+ "no-aria-hidden-body": "error",
12
+ "no-aria-hidden-on-focusable": "error",
13
+ "no-empty-headings": "error",
14
+ "no-heading-inside-button": "error",
15
+ "no-invalid-role": "error",
16
+ "no-non-scalable-viewport": "error",
17
+ "no-positive-tabindex": "error",
18
+ "no-redundant-role": "error",
19
+ "no-skip-heading-levels": "error",
20
+ "require-content": "error",
21
+ "require-form-method": "error",
22
+ "require-frame-title": "error",
23
+ "require-img-alt": "error",
24
+ "require-input-label": "error",
25
+ "require-meta-viewport": "error"
26
+ };
27
+
28
+ export default coreHtmlAccessibilityRules;
@@ -0,0 +1,42 @@
1
+ /**
2
+ * @import { Linter } from "eslint";
3
+ */
4
+
5
+ /**
6
+ * @satisfies {Linter.RulesRecord}
7
+ */
8
+ const coreHtmlBestPracticeRules = {
9
+ "max-element-depth": "error",
10
+ "css-no-empty-blocks": "error",
11
+ "head-order": "error",
12
+ "no-duplicate-attrs": "error",
13
+ "no-duplicate-class": "error",
14
+ "no-duplicate-id": "error",
15
+ "no-duplicate-in-head": "error",
16
+ "no-ineffective-attrs": "error",
17
+ "no-inline-styles": "error",
18
+ "no-invalid-attr-value": "error",
19
+ "no-invalid-entity": "error",
20
+ "no-nested-interactive": "error",
21
+ "no-obsolete-attrs": "error",
22
+ "no-obsolete-tags": "error",
23
+ "no-restricted-attr-values": "error",
24
+ "no-restricted-attrs": "error",
25
+ "no-restricted-tags": "error",
26
+ "no-script-style-type": "error",
27
+ "no-target-blank": "error",
28
+ "no-whitespace-only-children": "error",
29
+ "prefer-https": "error",
30
+ "require-attrs": "error",
31
+ "require-button-type": "error",
32
+ "require-closing-tags": "error",
33
+ "require-details-summary": "error",
34
+ "require-doctype": "error",
35
+ "require-explicit-size": "error",
36
+ "require-li-container": "error",
37
+ "require-meta-charset": "error",
38
+ "svg-require-viewbox": "error",
39
+ "use-baseline": "error"
40
+ };
41
+
42
+ export default coreHtmlBestPracticeRules;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @import { Linter } from "eslint";
3
+ */
4
+
5
+ /**
6
+ * @satisfies {Linter.RulesRecord}
7
+ */
8
+ const coreHtmlSeoRules = {
9
+ "no-multiple-h1": "error",
10
+ "require-lang": "error",
11
+ "require-meta-description": "error",
12
+ "require-open-graph-protocol": "error",
13
+ "require-title": "error"
14
+ };
15
+
16
+ export default coreHtmlSeoRules;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * @import { Linter } from "eslint";
3
+ */
4
+
5
+ /**
6
+ * @satisfies {Linter.RulesRecord}
7
+ */
8
+ const coreHtmlStyleRules = {
9
+ "attrs-newline": "error",
10
+ "class-spacing": "error",
11
+ "element-newline": "error",
12
+ "id-naming-convention": ["error", "kebab-case"],
13
+ indent: ["error", "tab"],
14
+ lowercase: "error",
15
+ "no-extra-spacing-tags": "error",
16
+ "no-extra-spacing-text": "error",
17
+ "no-multiple-empty-lines": "error",
18
+ "no-trailing-spaces": "error",
19
+ quotes: "error",
20
+ "sort-attrs": "error"
21
+ };
22
+
23
+ export default coreHtmlStyleRules;
@@ -0,0 +1,27 @@
1
+ import addPrefixToRules from "../../_common/add-prefix-to-rules.js";
2
+
3
+ import {
4
+ coreHtmlAccessibilityRules,
5
+ coreHtmlBestPracticeRules,
6
+ coreHtmlSeoRules,
7
+ coreHtmlStyleRules
8
+ } from "./core-html-rules/_exports.js";
9
+
10
+ /**
11
+ * @import { Linter } from "eslint";
12
+ */
13
+
14
+ /**
15
+ * @satisfies {Linter.RulesRecord}
16
+ */
17
+ const coreHtmlRules = addPrefixToRules(
18
+ "html",
19
+ {
20
+ ...coreHtmlBestPracticeRules,
21
+ ...coreHtmlSeoRules,
22
+ ...coreHtmlAccessibilityRules,
23
+ ...coreHtmlStyleRules
24
+ }
25
+ );
26
+
27
+ export default coreHtmlRules;
@@ -0,0 +1,10 @@
1
+ import pickUnicornRulesForLanguage from "../_common/pick-unicorn-rules-for-language.js";
2
+
3
+ import { coreHtmlRules } from "./html-rules/_exports.js";
4
+
5
+ const htmlRules = {
6
+ ...coreHtmlRules,
7
+ ...pickUnicornRulesForLanguage("html/html")
8
+ };
9
+
10
+ export default htmlRules;