@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,12 @@
1
+ import convertExtensionsToGlob from "../_common/convert-extensions-to-glob.js";
2
+
3
+ import { htmlPlugins, htmlRules } from "./html-config/_exports.js";
4
+
5
+ const htmlConfig = {
6
+ files: [convertExtensionsToGlob([".html"])],
7
+ language: "html/html",
8
+ plugins: htmlPlugins,
9
+ rules: htmlRules
10
+ };
11
+
12
+ export default htmlConfig;
@@ -0,0 +1 @@
1
+ export { default as jsonRules } from "./json-rules.js";
@@ -0,0 +1,9 @@
1
+ import coreJsonRules from "../_common/core-json-rules.js";
2
+ import pickUnicornRulesForLanguage from "../_common/pick-unicorn-rules-for-language.js";
3
+
4
+ const jsonRules = {
5
+ ...coreJsonRules,
6
+ ...pickUnicornRulesForLanguage("json/json")
7
+ };
8
+
9
+ export default jsonRules;
@@ -0,0 +1,13 @@
1
+ import convertExtensionsToGlob from "../_common/convert-extensions-to-glob.js";
2
+
3
+ import { jsonPlugins } from "./_common/_exports.js";
4
+ import { jsonRules } from "./json-config/_exports.js";
5
+
6
+ const jsonConfig = {
7
+ files: [convertExtensionsToGlob([".json"])],
8
+ language: "json/json",
9
+ plugins: jsonPlugins,
10
+ rules: jsonRules
11
+ };
12
+
13
+ export default jsonConfig;
@@ -0,0 +1 @@
1
+ export { default as jsoncRules } from "./jsonc-rules.js";
@@ -0,0 +1,9 @@
1
+ import coreJsonRules from "../_common/core-json-rules.js";
2
+ import pickUnicornRulesForLanguage from "../_common/pick-unicorn-rules-for-language.js";
3
+
4
+ const jsoncRules = {
5
+ ...coreJsonRules,
6
+ ...pickUnicornRulesForLanguage("json/jsonc")
7
+ };
8
+
9
+ export default jsoncRules;
@@ -0,0 +1,26 @@
1
+ import convertExtensionsToGlob from "../_common/convert-extensions-to-glob.js";
2
+
3
+ import { jsonPlugins } from "./_common/_exports.js";
4
+ import { jsoncRules } from "./jsonc-config/_exports.js";
5
+
6
+ const jsoncConfig = {
7
+ files: [
8
+ convertExtensionsToGlob([".jsonc"]),
9
+ ".vscode/*.json",
10
+ "**/.devcontainer.json",
11
+ "**/.devcontainer/devcontainer.json",
12
+ "**/deno.json",
13
+ "**/jsconfig.json",
14
+ "**/jsconfig.*.json",
15
+ "**/tsconfig.json",
16
+ "**/tsconfig.*.json"
17
+ ],
18
+ language: "json/jsonc",
19
+ languageOptions: {
20
+ allowTrailingCommas: true
21
+ },
22
+ plugins: jsonPlugins,
23
+ rules: jsoncRules
24
+ };
25
+
26
+ export default jsoncConfig;
@@ -0,0 +1 @@
1
+ export { default as jsxExtensions } from "./jsx-extensions.js";
@@ -0,0 +1,6 @@
1
+ import jsJsxExtensions from "../../_common/js-jsx-extensions.js";
2
+ import tsJsxExtensions from "../../_common/ts-jsx-extensions.js";
3
+
4
+ const jsxExtensions = /** @type {const} */ ([...jsJsxExtensions, ...tsJsxExtensions]);
5
+
6
+ export default jsxExtensions;
@@ -0,0 +1,7 @@
1
+ import convertExtensionsToGlob from "../_common/convert-extensions-to-glob.js";
2
+
3
+ import { jsxExtensions } from "./jsx-glob/_exports.js";
4
+
5
+ const jsxGlob = convertExtensionsToGlob(jsxExtensions);
6
+
7
+ export default jsxGlob;
@@ -0,0 +1,2 @@
1
+ export { default as mdPlugins } from "./md-plugins.js";
2
+ export { default as mdRules } from "./md-rules.js";
@@ -0,0 +1,9 @@
1
+ import markdown from "@eslint/markdown";
2
+ import unicorn from "eslint-plugin-unicorn";
3
+
4
+ const mdPlugins = {
5
+ markdown,
6
+ unicorn
7
+ };
8
+
9
+ export default mdPlugins;
@@ -0,0 +1 @@
1
+ export { default as coreMdRules } from "./core-md-rules.js";
@@ -0,0 +1,30 @@
1
+ import addPrefixToRules from "../../_common/add-prefix-to-rules.js";
2
+
3
+ const coreMdRules = addPrefixToRules(
4
+ "markdown",
5
+ {
6
+ "fenced-code-language": "error",
7
+ "fenced-code-meta": "error",
8
+ "heading-increment": "error",
9
+ "no-bare-urls": "error",
10
+ "no-duplicate-definitions": "error",
11
+ "no-duplicate-headings": "error",
12
+ "no-empty-definitions": "error",
13
+ "no-empty-images": "error",
14
+ "no-empty-links": "error",
15
+ "no-html": "error",
16
+ "no-invalid-label-refs": "error",
17
+ "no-missing-atx-heading-space": "error",
18
+ "no-missing-label-refs": "error",
19
+ "no-missing-link-fragments": "error",
20
+ "no-multiple-h1": "error",
21
+ "no-reference-like-urls": "error",
22
+ "no-reversed-media-syntax": "error",
23
+ "no-space-in-emphasis": "error",
24
+ "no-unused-definitions": "error",
25
+ "require-alt-text": "error",
26
+ "table-column-count": "error"
27
+ }
28
+ );
29
+
30
+ export default coreMdRules;
@@ -0,0 +1,10 @@
1
+ import pickUnicornRulesForLanguage from "../_common/pick-unicorn-rules-for-language.js";
2
+
3
+ import { coreMdRules } from "./md-rules/_exports.js";
4
+
5
+ const mdRules = {
6
+ ...coreMdRules,
7
+ ...pickUnicornRulesForLanguage("markdown/gfm")
8
+ };
9
+
10
+ export default mdRules;
@@ -0,0 +1,15 @@
1
+ import convertExtensionsToGlob from "../_common/convert-extensions-to-glob.js";
2
+
3
+ import { mdPlugins, mdRules } from "./md-config/_exports.js";
4
+
5
+ const mdConfig = {
6
+ files: [convertExtensionsToGlob([".md"])],
7
+ language: "markdown/gfm",
8
+ languageOptions: {
9
+ frontmatter: "yaml"
10
+ },
11
+ plugins: mdPlugins,
12
+ rules: mdRules
13
+ };
14
+
15
+ export default mdConfig;
@@ -1,4 +1,4 @@
1
- // TODO [2026-07-01]: Remove the directive below once this is resolved: https://github.com/eslint-community/eslint-plugin-eslint-comments/pull/246#issuecomment-3764843636
1
+ // TODO [2026-12-01]: Remove the directive below once this is resolved: https://github.com/eslint-community/eslint-plugin-eslint-comments/pull/246#issuecomment-3764843636
2
2
  /* eslint-disable import-x/default -- see above */
3
3
  /* eslint-disable import-x/max-dependencies -- collection file */
4
4
 
@@ -12,6 +12,7 @@ import jsdoc from "eslint-plugin-jsdoc";
12
12
  import noSecrets from "eslint-plugin-no-secrets";
13
13
  import perfectionist from "eslint-plugin-perfectionist";
14
14
  import promise from "eslint-plugin-promise";
15
+ import reactDebug from "eslint-plugin-react-debug";
15
16
  import reactDom from "eslint-plugin-react-dom";
16
17
  import reactJsx from "eslint-plugin-react-jsx";
17
18
  import reactNamingConvention from "eslint-plugin-react-naming-convention";
@@ -24,7 +25,7 @@ import sonarjs from "eslint-plugin-sonarjs";
24
25
  import unicorn from "eslint-plugin-unicorn";
25
26
 
26
27
  /**
27
- * @import { Linter } from "eslint"
28
+ * @import { Linter } from "eslint";
28
29
  */
29
30
 
30
31
  /**
@@ -32,17 +33,17 @@ import unicorn from "eslint-plugin-unicorn";
32
33
  */
33
34
  const plugins = /** @type {const} */ ({
34
35
  "@eslint-community/eslint-comments": eslintComments,
35
- "@stylistic": stylistic,
36
- command,
37
- depend,
38
-
39
36
  "@eslint-react": react,
37
+ "@eslint-react/debug": reactDebug,
40
38
  "@eslint-react/dom": reactDom,
41
39
  "@eslint-react/jsx": reactJsx,
42
40
  "@eslint-react/naming-convention": reactNamingConvention,
43
41
  "@eslint-react/rsc": reactRsc,
44
42
  "@eslint-react/web-api": reactWebApi,
43
+ "@stylistic": stylistic,
45
44
  "better-tailwindcss": betterTailwindcss,
45
+ command,
46
+ depend,
46
47
  "import-x": importX,
47
48
  jsdoc,
48
49
  "no-secrets": noSecrets,
@@ -1,2 +1 @@
1
1
  export { default as maximumLineLength } from "./maximum-line-length.js";
2
- export { default as tabWidth } from "./tab-width.js";
@@ -4,9 +4,7 @@ export { default as dependRules } from "./depend.js";
4
4
  export { default as eslintCommentsRules } from "./eslint-comments.js";
5
5
  export { default as importXRules } from "./import-x.js";
6
6
  export { default as jsdocRules } from "./jsdoc.js";
7
- export {
8
- default as layoutAndFormattingRules
9
- } from "./layout-and-formatting.js";
7
+ export { default as layoutAndFormattingRules } from "./layout-and-formatting.js";
10
8
  export { default as noSecretsRules } from "./no-secrets.js";
11
9
  export { default as perfectionistRules } from "./perfectionist.js";
12
10
  export { default as possibleProblemsRules } from "./possible-problems.js";
@@ -17,4 +15,3 @@ export { default as securityRules } from "./security.js";
17
15
  export { default as sonarjsRules } from "./sonarjs.js";
18
16
  export { default as stylisticRules } from "./stylistic.js";
19
17
  export { default as suggestionsRules } from "./suggestions.js";
20
- export { default as unicornRules } from "./unicorn.js";
@@ -0,0 +1,13 @@
1
+ import addPrefixToRules from "../../_common/add-prefix-to-rules.js";
2
+
3
+ const correctnessRules = addPrefixToRules(
4
+ "better-tailwindcss",
5
+ {
6
+ "no-concatenated-classes": "error",
7
+ "no-conflicting-classes": "error",
8
+ "no-restricted-classes": ["error", { restrict: [] }],
9
+ "no-unknown-classes": "error"
10
+ }
11
+ );
12
+
13
+ export default correctnessRules;
@@ -0,0 +1,42 @@
1
+ import addPrefixToRules from "../../_common/add-prefix-to-rules.js";
2
+ import tabWidth from "../../_common/tab-width.js";
3
+ import maximumLineLength from "../_common/maximum-line-length.js";
4
+
5
+ const stylisticRules = addPrefixToRules(
6
+ "better-tailwindcss",
7
+ {
8
+ "enforce-canonical-classes": [
9
+ "error",
10
+ {
11
+ collapse: true,
12
+ logical: true
13
+ }
14
+ ],
15
+ "enforce-consistent-class-order": [
16
+ "error",
17
+ {
18
+ order: "strict"
19
+ }
20
+ ],
21
+ "enforce-consistent-line-wrapping": [
22
+ "error",
23
+ {
24
+ classesPerLine: 0,
25
+ group: "newLine",
26
+ indent: "tab",
27
+ lineBreakStyle: "unix",
28
+ preferSingleLine: false,
29
+ printWidth: maximumLineLength,
30
+ strictness: "strict",
31
+ tabWidth
32
+ }
33
+ ],
34
+ "enforce-consistent-variant-order": "error",
35
+ "enforce-logical-properties": ["error", { ignore: ["size"] }],
36
+ "no-deprecated-classes": "error",
37
+ "no-duplicate-classes": "error",
38
+ "no-unnecessary-whitespace": ["error", { allowMultiline: true }]
39
+ }
40
+ );
41
+
42
+ export default stylisticRules;
@@ -0,0 +1,15 @@
1
+ import { correctnessRules, stylisticRules } from "./better-tailwindcss/_exports.js";
2
+
3
+ /**
4
+ * @import { Linter } from "eslint";
5
+ */
6
+
7
+ /**
8
+ * @satisfies {Linter.RulesRecord}
9
+ */
10
+ const betterTailwindcssRules = {
11
+ ...correctnessRules,
12
+ ...stylisticRules
13
+ };
14
+
15
+ export default betterTailwindcssRules;
@@ -0,0 +1,17 @@
1
+ import addPrefixToRules from "../_common/add-prefix-to-rules.js";
2
+
3
+ /**
4
+ * @import { Linter } from "eslint";
5
+ */
6
+
7
+ /**
8
+ * @satisfies {Linter.RulesRecord}
9
+ */
10
+ const commandRules = addPrefixToRules(
11
+ "command",
12
+ {
13
+ command: "error"
14
+ }
15
+ );
16
+
17
+ export default commandRules;
@@ -0,0 +1,17 @@
1
+ import addPrefixToRules from "../_common/add-prefix-to-rules.js";
2
+
3
+ /**
4
+ * @import { Linter } from "eslint";
5
+ */
6
+
7
+ /**
8
+ * @satisfies {Linter.RulesRecord}
9
+ */
10
+ const dependRules = addPrefixToRules(
11
+ "depend",
12
+ {
13
+ "ban-dependencies": "error"
14
+ }
15
+ );
16
+
17
+ export default dependRules;
@@ -0,0 +1,14 @@
1
+ import addPrefixToRules from "../../_common/add-prefix-to-rules.js";
2
+
3
+ const bestPracticesRules = addPrefixToRules(
4
+ "@eslint-community/eslint-comments",
5
+ {
6
+ "disable-enable-pair": "off",
7
+ "no-aggregating-enable": "error",
8
+ "no-duplicate-disable": "error",
9
+ "no-unlimited-disable": "error",
10
+ "no-unused-enable": "error"
11
+ }
12
+ );
13
+
14
+ export default bestPracticesRules;
@@ -0,0 +1,17 @@
1
+ import addPrefixToRules from "../../_common/add-prefix-to-rules.js";
2
+
3
+ const stylisticIssuesRules = addPrefixToRules(
4
+ "@eslint-community/eslint-comments",
5
+ {
6
+ "no-restricted-disable": ["error"],
7
+ "no-use": [
8
+ "error",
9
+ {
10
+ allow: ["eslint-disable"]
11
+ }
12
+ ],
13
+ "require-description": "error"
14
+ }
15
+ );
16
+
17
+ export default stylisticIssuesRules;
@@ -0,0 +1,15 @@
1
+ import { bestPracticesRules, stylisticIssuesRules } from "./eslint-comments/_exports.js";
2
+
3
+ /**
4
+ * @import { Linter } from "eslint";
5
+ */
6
+
7
+ /**
8
+ * @satisfies {Linter.RulesRecord}
9
+ */
10
+ const eslintCommentsRules = {
11
+ ...bestPracticesRules,
12
+ ...stylisticIssuesRules
13
+ };
14
+
15
+ export default eslintCommentsRules;
@@ -0,0 +1,26 @@
1
+ import addPrefixToRules from "../../_common/add-prefix-to-rules.js";
2
+
3
+ const helpfulWarningsRules = addPrefixToRules(
4
+ "import-x",
5
+ {
6
+ export: "error",
7
+ "no-deprecated": "warn",
8
+ "no-empty-named-blocks": "error",
9
+ "no-extraneous-dependencies": "off",
10
+ "no-mutable-exports": "error",
11
+ "no-named-as-default": "off",
12
+ "no-named-as-default-member": "error",
13
+ "no-rename-default": "off",
14
+ "no-unused-modules": [
15
+ "error",
16
+ {
17
+ ignoreUnusedTypeExports: true,
18
+ missingExports: true,
19
+ suppressMissingFileEnumeratorAPIWarning: true,
20
+ unusedExports: false
21
+ }
22
+ ]
23
+ }
24
+ );
25
+
26
+ export default helpfulWarningsRules;
@@ -0,0 +1,14 @@
1
+ import addPrefixToRules from "../../_common/add-prefix-to-rules.js";
2
+
3
+ const moduleSystemsRules = addPrefixToRules(
4
+ "import-x",
5
+ {
6
+ "no-amd": "error",
7
+ "no-commonjs": "error",
8
+ "no-import-module-exports": "error",
9
+ "no-nodejs-modules": "off",
10
+ unambiguous: "error"
11
+ }
12
+ );
13
+
14
+ export default moduleSystemsRules;
@@ -0,0 +1,40 @@
1
+ import addPrefixToRules from "../../_common/add-prefix-to-rules.js";
2
+
3
+ const staticAnalysisRules = addPrefixToRules(
4
+ "import-x",
5
+ {
6
+ default: "error",
7
+ named: "error",
8
+ namespace: "error",
9
+ "no-absolute-path": "error",
10
+ "no-cycle": [
11
+ "error",
12
+ {
13
+ maxDepth: Infinity
14
+ }
15
+ ],
16
+ "no-dynamic-require": "error",
17
+ "no-internal-modules": [
18
+ "off",
19
+ {
20
+ allow: []
21
+ }
22
+ ],
23
+ "no-relative-packages": "error",
24
+ "no-relative-parent-imports": "off",
25
+ "no-restricted-paths": "off",
26
+ "no-self-import": "error",
27
+ // TODO [2026-12-01]: Change to "error" when there is a resolver for Deno (maybe https://github.com/redabacha/eslint-import-resolver-deno)
28
+ "no-unresolved": "off",
29
+ "no-useless-path-segments": [
30
+ "error",
31
+ {
32
+ commonjs: false,
33
+ noUselessIndex: false
34
+ }
35
+ ],
36
+ "no-webpack-loader-syntax": "error"
37
+ }
38
+ );
39
+
40
+ export default staticAnalysisRules;
@@ -0,0 +1 @@
1
+ export { default as maxDependencies } from "./max-dependencies.js";
@@ -0,0 +1,3 @@
1
+ const maxDependencies = 10;
2
+
3
+ export default maxDependencies;
@@ -0,0 +1,94 @@
1
+ import addPrefixToRules from "../../_common/add-prefix-to-rules.js";
2
+
3
+ import { maxDependencies } from "./style-guide/_exports.js";
4
+
5
+ const styleGuideRules = addPrefixToRules(
6
+ "import-x",
7
+ {
8
+ "max-dependencies": [
9
+ "error",
10
+ {
11
+ max: maxDependencies
12
+ }
13
+ ],
14
+ first: "error",
15
+ "consistent-type-specifier-style": "error",
16
+ "dynamic-import-chunkname": "off",
17
+ "exports-last": "error",
18
+ extensions: [
19
+ "error",
20
+ "ignorePackages",
21
+ {
22
+ checkTypeImports: true,
23
+ fix: true
24
+ }
25
+ ],
26
+ "group-exports": "error",
27
+ "newline-after-import": "error",
28
+ "no-anonymous-default-export": [
29
+ "error",
30
+ {
31
+ allowAnonymousClass: false,
32
+ allowAnonymousFunction: false,
33
+ allowArray: false,
34
+ allowArrowFunction: false,
35
+ allowCallExpression: false,
36
+ allowLiteral: false,
37
+ allowNew: false,
38
+ allowObject: false
39
+ }
40
+ ],
41
+ "no-default-export": "off",
42
+ "no-duplicates": "error",
43
+ "no-named-default": "error",
44
+ "no-named-export": "off",
45
+ "no-namespace": "off",
46
+ "no-unassigned-import": "error",
47
+ order: [
48
+ "off",
49
+ {
50
+ alphabetize: {
51
+ caseInsensitive: false,
52
+ order: "asc"
53
+ },
54
+ groups: [
55
+ "type",
56
+ "object",
57
+ "builtin",
58
+ "external",
59
+ "internal",
60
+ "parent",
61
+ "sibling",
62
+ "index"
63
+ ],
64
+ "newlines-between": "always",
65
+ pathGroups: [
66
+ ...new Map([
67
+ ["builtin", ["@std"]],
68
+ [
69
+ "internal",
70
+ [
71
+ "@/utilities",
72
+ "@/plugins",
73
+ "@/logic",
74
+ "@/components",
75
+ "@/islands"
76
+ ]
77
+ ]
78
+ ])
79
+ ]
80
+ .flatMap(([group, patterns]) => patterns
81
+ .map((pattern) => ({
82
+ group,
83
+ pattern: `${pattern}/**`,
84
+ position: "after"
85
+ }))),
86
+ warnOnUnassignedImports: false
87
+ }
88
+ ],
89
+ "prefer-default-export": ["error", { target: "single" }],
90
+ "prefer-namespace-import": ["error", { patterns: ["react"] }]
91
+ }
92
+ );
93
+
94
+ export default styleGuideRules;
@@ -0,0 +1,22 @@
1
+ import {
2
+ helpfulWarningsRules,
3
+ moduleSystemsRules,
4
+ staticAnalysisRules,
5
+ styleGuideRules
6
+ } from "./import-x/_exports.js";
7
+
8
+ /**
9
+ * @import { Linter } from "eslint";
10
+ */
11
+
12
+ /**
13
+ * @satisfies {Linter.RulesRecord}
14
+ */
15
+ const importXRules = {
16
+ ...helpfulWarningsRules,
17
+ ...moduleSystemsRules,
18
+ ...staticAnalysisRules,
19
+ ...styleGuideRules
20
+ };
21
+
22
+ export default importXRules;