@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
package/eslint.config.js DELETED
@@ -1,25 +0,0 @@
1
- import config from "./config.js";
2
-
3
- const eslintConfig = [
4
- ...config,
5
- {
6
- rules: {
7
- "tailwindcss/classnames-order": "off",
8
- "tailwindcss/enforces-negative-arbitrary-values": "off",
9
- "tailwindcss/enforces-shorthand": "off",
10
- "tailwindcss/migration-from-tailwind-2": "off",
11
- "tailwindcss/no-arbitrary-value": "off",
12
- "tailwindcss/no-contradicting-classname": "off",
13
- "tailwindcss/no-custom-classname": "off",
14
- "tailwindcss/no-unnecessary-arbitrary-value": "off"
15
- }
16
- },
17
- {
18
- files: ["rules/unicorn.js"],
19
- rules: {
20
- "unicorn/string-content": "off"
21
- }
22
- }
23
- ];
24
-
25
- export default eslintConfig;
@@ -1,7 +0,0 @@
1
- const correctnessRules = {
2
- "better-tailwindcss/no-conflicting-classes": "error",
3
- "better-tailwindcss/no-restricted-classes": ["error", { restrict: [] }],
4
- "better-tailwindcss/no-unknown-classes": "error"
5
- };
6
-
7
- export default correctnessRules;
@@ -1,38 +0,0 @@
1
- import maximumLineLength from "../_common/maximum-line-length.js";
2
- import tabWidth from "../_common/tab-width.js";
3
-
4
- const stylisticRules = {
5
- "better-tailwindcss/enforce-canonical-classes": [
6
- "error",
7
- {
8
- collapse: true,
9
- logical: true
10
- }
11
- ],
12
- "better-tailwindcss/enforce-consistent-class-order": [
13
- "error",
14
- {
15
- order: "strict"
16
- }
17
- ],
18
- "better-tailwindcss/enforce-consistent-line-wrapping": [
19
- "error",
20
- {
21
- classesPerLine: 0,
22
- group: "newLine",
23
- indent: "tab",
24
- lineBreakStyle: "unix",
25
- preferSingleLine: false,
26
- printWidth: maximumLineLength,
27
- strictness: "strict",
28
- tabWidth
29
- }
30
- ],
31
- "better-tailwindcss/enforce-consistent-variant-order": "error",
32
- "better-tailwindcss/enforce-logical-properties": ["error", { ignore: ["size"] }],
33
- "better-tailwindcss/no-deprecated-classes": "error",
34
- "better-tailwindcss/no-duplicate-classes": "error",
35
- "better-tailwindcss/no-unnecessary-whitespace": ["error", { allowMultiline: true }]
36
- };
37
-
38
- export default stylisticRules;
@@ -1,19 +0,0 @@
1
- import * as betterTailwindcssRuleSets from "./better-tailwindcss/_exports.js";
2
-
3
- /**
4
- * @import { Linter } from "eslint";
5
- */
6
-
7
- /**
8
- * @satisfies {Linter.RulesRecord}
9
- */
10
- const betterTailwindcssRules = Object.values(betterTailwindcssRuleSets)
11
- .reduce(
12
- (allRules, ruleSet) => ({
13
- ...allRules,
14
- ...ruleSet
15
- }),
16
- {}
17
- );
18
-
19
- export default betterTailwindcssRules;
package/rules/command.js DELETED
@@ -1,12 +0,0 @@
1
- /**
2
- * @import { Linter } from "eslint";
3
- */
4
-
5
- /**
6
- * @satisfies {Linter.RulesRecord}
7
- */
8
- const commandRules = {
9
- "command/command": "error"
10
- };
11
-
12
- export default commandRules;
package/rules/depend.js DELETED
@@ -1,12 +0,0 @@
1
- /**
2
- * @import { Linter } from "eslint";
3
- */
4
-
5
- /**
6
- * @satisfies {Linter.RulesRecord}
7
- */
8
- const dependRules = {
9
- "depend/ban-dependencies": "error"
10
- };
11
-
12
- export default dependRules;
@@ -1,9 +0,0 @@
1
- const bestPracticesRules = {
2
- "@eslint-community/eslint-comments/disable-enable-pair": "off",
3
- "@eslint-community/eslint-comments/no-aggregating-enable": "error",
4
- "@eslint-community/eslint-comments/no-duplicate-disable": "error",
5
- "@eslint-community/eslint-comments/no-unlimited-disable": "error",
6
- "@eslint-community/eslint-comments/no-unused-enable": "error"
7
- };
8
-
9
- export default bestPracticesRules;
@@ -1,12 +0,0 @@
1
- const stylisticIssuesRules = {
2
- "@eslint-community/eslint-comments/no-restricted-disable": ["error"],
3
- "@eslint-community/eslint-comments/no-use": [
4
- "error",
5
- {
6
- allow: ["eslint-disable"]
7
- }
8
- ],
9
- "@eslint-community/eslint-comments/require-description": "error"
10
- };
11
-
12
- export default stylisticIssuesRules;
@@ -1,19 +0,0 @@
1
- import * as eslintCommentsRuleSets from "./eslint-comments/_exports.js";
2
-
3
- /**
4
- * @import { Linter } from "eslint";
5
- */
6
-
7
- /**
8
- * @satisfies {Linter.RulesRecord}
9
- */
10
- const eslintCommentsRules = Object.values(eslintCommentsRuleSets)
11
- .reduce(
12
- (allRules, ruleSet) => ({
13
- ...allRules,
14
- ...ruleSet
15
- }),
16
- {}
17
- );
18
-
19
- export default eslintCommentsRules;
@@ -1,21 +0,0 @@
1
- const helpfulWarningsRules = {
2
- "import-x/export": "error",
3
- "import-x/no-deprecated": "warn",
4
- "import-x/no-empty-named-blocks": "error",
5
- "import-x/no-extraneous-dependencies": "off",
6
- "import-x/no-mutable-exports": "error",
7
- "import-x/no-named-as-default": "off",
8
- "import-x/no-named-as-default-member": "error",
9
- "import-x/no-rename-default": "off",
10
- "import-x/no-unused-modules": [
11
- "error",
12
- {
13
- ignoreUnusedTypeExports: true,
14
- missingExports: true,
15
- suppressMissingFileEnumeratorAPIWarning: true,
16
- unusedExports: false
17
- }
18
- ]
19
- };
20
-
21
- export default helpfulWarningsRules;
@@ -1,9 +0,0 @@
1
- const moduleSystemsRules = {
2
- "import-x/no-amd": "error",
3
- "import-x/no-commonjs": "error",
4
- "import-x/no-import-module-exports": "error",
5
- "import-x/no-nodejs-modules": "off",
6
- "import-x/unambiguous": "error"
7
- };
8
-
9
- export default moduleSystemsRules;
@@ -1,35 +0,0 @@
1
- const staticAnalysisRules = {
2
- "import-x/default": "error",
3
- "import-x/named": "error",
4
- "import-x/namespace": "error",
5
- "import-x/no-absolute-path": "error",
6
- "import-x/no-cycle": [
7
- "error",
8
- {
9
- maxDepth: Infinity
10
- }
11
- ],
12
- "import-x/no-dynamic-require": "error",
13
- "import-x/no-internal-modules": [
14
- "off",
15
- {
16
- allow: []
17
- }
18
- ],
19
- "import-x/no-relative-packages": "error",
20
- "import-x/no-relative-parent-imports": "off",
21
- "import-x/no-restricted-paths": "off",
22
- "import-x/no-self-import": "error",
23
- // TODO [2026-07-01]: Change to "error" when there is a resolver for deno (maybe https://github.com/redabacha/eslint-import-resolver-deno)
24
- "import-x/no-unresolved": "off",
25
- "import-x/no-useless-path-segments": [
26
- "error",
27
- {
28
- commonjs: false,
29
- noUselessIndex: false
30
- }
31
- ],
32
- "import-x/no-webpack-loader-syntax": "error"
33
- };
34
-
35
- export default staticAnalysisRules;
@@ -1,89 +0,0 @@
1
- const maxDependencies = 10;
2
-
3
- const styleGuideRules = {
4
- "import-x/consistent-type-specifier-style": "error",
5
- "import-x/dynamic-import-chunkname": "off",
6
- "import-x/exports-last": "error",
7
- "import-x/extensions": [
8
- "error",
9
- "ignorePackages",
10
- {
11
- checkTypeImports: true,
12
- fix: true
13
- }
14
- ],
15
- "import-x/first": "error",
16
- "import-x/group-exports": "error",
17
- "import-x/max-dependencies": [
18
- "error",
19
- {
20
- max: maxDependencies
21
- }
22
- ],
23
- "import-x/newline-after-import": "error",
24
- "import-x/no-anonymous-default-export": [
25
- "error",
26
- {
27
- allowAnonymousClass: false,
28
- allowAnonymousFunction: false,
29
- allowArray: false,
30
- allowArrowFunction: false,
31
- allowCallExpression: false,
32
- allowLiteral: false,
33
- allowNew: false,
34
- allowObject: false
35
- }
36
- ],
37
- "import-x/no-default-export": "off",
38
- "import-x/no-duplicates": "error",
39
- "import-x/no-named-default": "error",
40
- "import-x/no-named-export": "off",
41
- "import-x/no-namespace": "off",
42
- "import-x/no-unassigned-import": "error",
43
- "import-x/order": [
44
- "off",
45
- {
46
- alphabetize: {
47
- caseInsensitive: false,
48
- order: "asc"
49
- },
50
- groups: [
51
- "type",
52
- "object",
53
- "builtin",
54
- "external",
55
- "internal",
56
- "parent",
57
- "sibling",
58
- "index"
59
- ],
60
- "newlines-between": "always",
61
- pathGroups: [
62
- ...new Map([
63
- ["builtin", ["@std"]],
64
- [
65
- "internal",
66
- [
67
- "@/utilities",
68
- "@/plugins",
69
- "@/logic",
70
- "@/components",
71
- "@/islands"
72
- ]
73
- ]
74
- ])
75
- ]
76
- .flatMap(([group, patterns]) => patterns
77
- .map((pattern) => ({
78
- group,
79
- pattern: `${pattern}/**`,
80
- position: "after"
81
- }))),
82
- warnOnUnassignedImports: false
83
- }
84
- ],
85
- "import-x/prefer-default-export": ["error", { target: "single" }],
86
- "import-x/prefer-namespace-import": ["error", { patterns: ["react"] }]
87
- };
88
-
89
- export default styleGuideRules;
package/rules/import-x.js DELETED
@@ -1,19 +0,0 @@
1
- import * as importRuleSets from "./import-x/_exports.js";
2
-
3
- /**
4
- * @import { Linter } from "eslint";
5
- */
6
-
7
- /**
8
- * @satisfies {Linter.RulesRecord}
9
- */
10
- const importXRules = Object.values(importRuleSets)
11
- .reduce(
12
- (allRules, ruleSet) => ({
13
- ...allRules,
14
- ...ruleSet
15
- }),
16
- {}
17
- );
18
-
19
- export default importXRules;