@pumpn/eslint-config 17.2.4 → 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,42 @@
1
+ import addPrefixToRules from "../../_common/add-prefix-to-rules.js";
2
+
3
+ const jsxRules = addPrefixToRules(
4
+ "@stylistic",
5
+ {
6
+ "exp-jsx-props-style": [
7
+ "error",
8
+ {
9
+ multiLine: {
10
+ minItems: 0
11
+ },
12
+ singleLine: {
13
+ maxItems: 3
14
+ }
15
+ }
16
+ ],
17
+ "jsx-child-element-spacing": "error",
18
+ "jsx-closing-tag-location": ["error", "line-aligned"],
19
+ "jsx-equals-spacing": ["error", "never"],
20
+ "jsx-max-props-per-line": [
21
+ "error",
22
+ {
23
+ maximum: 1,
24
+ when: "multiline"
25
+ }
26
+ ],
27
+ "jsx-one-expression-per-line": ["error", { allow: "single-line" }],
28
+ "jsx-pascal-case": ["error", { allowNamespace: true }],
29
+ "jsx-self-closing-comp": "error",
30
+ "jsx-tag-spacing": [
31
+ "error",
32
+ {
33
+ beforeClosing: "allow",
34
+ beforeSelfClosing: "always",
35
+ afterOpening: "never",
36
+ closingSlash: "never"
37
+ }
38
+ ]
39
+ }
40
+ );
41
+
42
+ export default jsxRules;
@@ -0,0 +1 @@
1
+ export { default as maxIgnoredChainDepth } from "./max-ignored-chain-depth.js";
@@ -0,0 +1,3 @@
1
+ const maxIgnoredChainDepth = 3;
2
+
3
+ export default maxIgnoredChainDepth;
@@ -0,0 +1,67 @@
1
+ import addPrefixToRules from "../../_common/add-prefix-to-rules.js";
2
+
3
+ import { minItemsForArrayNewline } from "./_common/_exports.js";
4
+ import { maxIgnoredChainDepth } from "./linebreaks/_exports.js";
5
+
6
+ const lineBreaksRules = addPrefixToRules(
7
+ "@stylistic",
8
+ {
9
+ "array-element-newline": [
10
+ "error",
11
+ {
12
+ minItems: minItemsForArrayNewline,
13
+ multiline: true
14
+ }
15
+ ],
16
+ "eol-last": ["error", "always"],
17
+ "function-call-argument-newline": ["error", "consistent"],
18
+ "implicit-arrow-linebreak": ["error", "beside"],
19
+ "jsx-first-prop-new-line": ["error", "multiline"],
20
+ "jsx-function-call-newline": ["error", "multiline"],
21
+ "jsx-newline": "error",
22
+ "linebreak-style": ["error", "unix"],
23
+ "lines-between-class-members": ["error", "always"],
24
+ "newline-per-chained-call": [
25
+ "error",
26
+ {
27
+ ignoreChainWithDepth: maxIgnoredChainDepth
28
+ }
29
+ ],
30
+ "object-property-newline": [
31
+ "error",
32
+ {
33
+ allowAllPropertiesOnSameLine: false
34
+ }
35
+ ],
36
+ "padding-line-between-statements": [
37
+ "error",
38
+ {
39
+ prev: "*",
40
+ next: "return",
41
+ blankLine: "always"
42
+ },
43
+ {
44
+ prev: ["const", "let", "var"],
45
+ next: "*",
46
+ blankLine: "always"
47
+ },
48
+ {
49
+ prev: ["const", "let", "var"],
50
+ next: ["const", "let", "var"],
51
+ blankLine: "any"
52
+ },
53
+ {
54
+ prev: [
55
+ "return",
56
+ "break",
57
+ "block",
58
+ "block-like"
59
+ ],
60
+ next: ["case", "default"],
61
+ blankLine: "always"
62
+ }
63
+ ]
64
+ }
65
+ );
66
+
67
+ export default lineBreaksRules;
@@ -0,0 +1,49 @@
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 miscRules = addPrefixToRules(
6
+ "@stylistic",
7
+ {
8
+ "max-len": [
9
+ "error",
10
+ {
11
+ code: maximumLineLength,
12
+ ignoreComments: true,
13
+ ignoreRegExpLiterals: true,
14
+ ignoreStrings: true,
15
+ ignoreTemplateLiterals: true,
16
+ ignoreTrailingComments: false,
17
+ ignoreUrls: true,
18
+ tabWidth
19
+ }
20
+ ],
21
+ "max-statements-per-line": ["error", { max: 1 }],
22
+ "member-delimiter-style": [
23
+ "error",
24
+ {
25
+ multiline: {
26
+ delimiter: "comma",
27
+ requireLast: false
28
+ },
29
+ multilineDetection: "brackets",
30
+ singleline: {
31
+ delimiter: "comma",
32
+ requireLast: false
33
+ }
34
+ }
35
+ ],
36
+ "nonblock-statement-body-position": ["error", "beside"],
37
+ "one-var-declaration-per-line": ["error", "always"],
38
+ "padded-blocks": [
39
+ "error",
40
+ {
41
+ blocks: "never",
42
+ classes: "always",
43
+ switches: "never"
44
+ }
45
+ ]
46
+ }
47
+ );
48
+
49
+ export default miscRules;
@@ -0,0 +1,31 @@
1
+ import addPrefixToRules from "../../_common/add-prefix-to-rules.js";
2
+
3
+ const operatorsRules = addPrefixToRules(
4
+ "@stylistic",
5
+ {
6
+ "dot-location": ["error", "property"],
7
+ "multiline-ternary": ["error", "always-multiline"],
8
+ "no-mixed-operators": "error",
9
+ "operator-linebreak": [
10
+ "error",
11
+ "after",
12
+ {
13
+ overrides: {
14
+ ":": "before",
15
+ "?": "before"
16
+ }
17
+ }
18
+ ],
19
+ "space-infix-ops": ["error", { int32Hint: false }],
20
+ "space-unary-ops": [
21
+ "error",
22
+ {
23
+ nonwords: false,
24
+ overrides: {},
25
+ words: true
26
+ }
27
+ ]
28
+ }
29
+ );
30
+
31
+ export default operatorsRules;
@@ -0,0 +1,12 @@
1
+ import addPrefixToRules from "../../_common/add-prefix-to-rules.js";
2
+
3
+ const quotesRules = addPrefixToRules(
4
+ "@stylistic",
5
+ {
6
+ "jsx-quotes": ["error", "prefer-double"],
7
+ "quote-props": ["error", "as-needed"],
8
+ quotes: ["error", "double"]
9
+ }
10
+ );
11
+
12
+ export default quotesRules;
@@ -0,0 +1,19 @@
1
+ import addPrefixToRules from "../../_common/add-prefix-to-rules.js";
2
+
3
+ const semisRules = addPrefixToRules(
4
+ "@stylistic",
5
+ {
6
+ "no-extra-semi": "off",
7
+ semi: ["error", "always"],
8
+ "semi-spacing": [
9
+ "error",
10
+ {
11
+ before: false,
12
+ after: true
13
+ }
14
+ ],
15
+ "semi-style": ["error", "last"]
16
+ }
17
+ );
18
+
19
+ export default semisRules;
@@ -0,0 +1,68 @@
1
+ import addPrefixToRules from "../../_common/add-prefix-to-rules.js";
2
+
3
+ const spacingRules = addPrefixToRules(
4
+ "@stylistic",
5
+ {
6
+ "arrow-spacing": [
7
+ "error",
8
+ {
9
+ before: true,
10
+ after: true
11
+ }
12
+ ],
13
+ "block-spacing": ["error", "always"],
14
+ "computed-property-spacing": ["error", "never"],
15
+ "exp-list-style": [
16
+ "error",
17
+ {
18
+ multiLine: {
19
+ minItems: 0
20
+ },
21
+ overrides: {
22
+ "[]": "off",
23
+ "{}": { singleLine: { spacing: "always" } }
24
+ },
25
+ singleLine: {
26
+ maxItems: 3,
27
+ spacing: "never"
28
+ }
29
+ }
30
+ ],
31
+ "function-call-spacing": ["error", "never"],
32
+ "generator-star-spacing": ["error", "after"],
33
+ "key-spacing": [
34
+ "error",
35
+ {
36
+ beforeColon: false,
37
+ afterColon: true,
38
+ mode: "strict"
39
+ }
40
+ ],
41
+ "keyword-spacing": [
42
+ "error",
43
+ {
44
+ before: true,
45
+ after: true
46
+ }
47
+ ],
48
+ "rest-spread-spacing": ["error", "never"],
49
+ "space-before-blocks": ["error", "always"],
50
+ "switch-colon-spacing": [
51
+ "error",
52
+ {
53
+ before: false,
54
+ after: true
55
+ }
56
+ ],
57
+ "template-tag-spacing": ["error", "never"],
58
+ "yield-star-spacing": [
59
+ "error",
60
+ {
61
+ before: false,
62
+ after: true
63
+ }
64
+ ]
65
+ }
66
+ );
67
+
68
+ export default spacingRules;
@@ -0,0 +1,12 @@
1
+ import addPrefixToRules from "../../_common/add-prefix-to-rules.js";
2
+
3
+ const typesRules = addPrefixToRules(
4
+ "@stylistic",
5
+ {
6
+ "type-annotation-spacing": "error",
7
+ "type-generic-spacing": "error",
8
+ "type-named-tuple-spacing": "error"
9
+ }
10
+ );
11
+
12
+ export default typesRules;
@@ -0,0 +1,40 @@
1
+ import {
2
+ bracketsRules,
3
+ commasRules,
4
+ commentsRules,
5
+ disallowRules,
6
+ indentRules,
7
+ jsxRules,
8
+ lineBreaksRules,
9
+ miscRules,
10
+ operatorsRules,
11
+ quotesRules,
12
+ semisRules,
13
+ spacingRules,
14
+ typesRules
15
+ } from "./stylistic/_exports.js";
16
+
17
+ /**
18
+ * @import { Linter } from "eslint";
19
+ */
20
+
21
+ /**
22
+ * @satisfies {Linter.RulesRecord}
23
+ */
24
+ const stylisticRules = {
25
+ ...bracketsRules,
26
+ ...commasRules,
27
+ ...commentsRules,
28
+ ...disallowRules,
29
+ ...indentRules,
30
+ ...jsxRules,
31
+ ...lineBreaksRules,
32
+ ...miscRules,
33
+ ...operatorsRules,
34
+ ...quotesRules,
35
+ ...semisRules,
36
+ ...spacingRules,
37
+ ...typesRules
38
+ };
39
+
40
+ export default stylisticRules;
@@ -0,0 +1,9 @@
1
+ export { default as maxClassesPerFile } from "./max-classes-per-file.js";
2
+ export { default as maxDepth } from "./max-depth.js";
3
+ export { default as maxIdentifierLength } from "./max-identifier-length.js";
4
+ export { default as maxLinesPerFile } from "./max-lines-per-file.js";
5
+ export { default as maxLinesPerFunction } from "./max-lines-per-function.js";
6
+ export { default as maxNestedCallbacks } from "./max-nested-callbacks.js";
7
+ export { default as maxParameters } from "./max-parameters.js";
8
+ export { default as maxStatements } from "./max-statements.js";
9
+ export { default as minIdentifierLength } from "./min-identifier-length.js";
@@ -0,0 +1,3 @@
1
+ const maxClassesPerFile = 1;
2
+
3
+ export default maxClassesPerFile;
@@ -0,0 +1,3 @@
1
+ const maxDepth = 8;
2
+
3
+ export default maxDepth;
@@ -0,0 +1,3 @@
1
+ const maxIdentifierLength = 40;
2
+
3
+ export default maxIdentifierLength;
@@ -0,0 +1,3 @@
1
+ const maxLinesPerFile = 500;
2
+
3
+ export default maxLinesPerFile;
@@ -0,0 +1,3 @@
1
+ const maxLinesPerFunction = 100;
2
+
3
+ export default maxLinesPerFunction;
@@ -0,0 +1,3 @@
1
+ const maxNestedCallbacks = 10;
2
+
3
+ export default maxNestedCallbacks;
@@ -0,0 +1,3 @@
1
+ const maxParameters = 3;
2
+
3
+ export default maxParameters;
@@ -0,0 +1,3 @@
1
+ const maxStatements = 20;
2
+
3
+ export default maxStatements;
@@ -0,0 +1,3 @@
1
+ const minIdentifierLength = 2;
2
+
3
+ export default minIdentifierLength;
@@ -1,17 +1,19 @@
1
+ import {
2
+ maxClassesPerFile,
3
+ maxDepth,
4
+ maxIdentifierLength,
5
+ maxLinesPerFile,
6
+ maxLinesPerFunction,
7
+ maxNestedCallbacks,
8
+ maxParameters,
9
+ maxStatements,
10
+ minIdentifierLength
11
+ } from "./suggestions/_exports.js";
12
+
1
13
  /**
2
14
  * @import { Linter } from "eslint";
3
15
  */
4
16
 
5
- const minIdentifierLength = 2;
6
- const maxIdentifierLength = 40;
7
- const maxClassesPerFile = 1;
8
- const maxDepth = 8;
9
- const maxLinesPerFile = 500;
10
- const maxLinesPerFunction = 100;
11
- const maxNestedCallbacks = 10;
12
- const maxParameters = 3;
13
- const maxStatements = 20;
14
-
15
17
  /**
16
18
  * @satisfies {Linter.RulesRecord}
17
19
  */
@@ -74,12 +76,12 @@ const suggestionsRules = {
74
76
  ],
75
77
  "id-match": "off",
76
78
  "init-declarations": "off",
77
- "logical-assignment-operators": "error",
79
+ "logical-assignment-operators": "off",
78
80
  "multiline-comment-style": "off",
79
81
  "new-cap": "error",
80
82
  "no-alert": "off",
81
83
  "no-array-constructor": "error",
82
- "no-bitwise": "error",
84
+ "no-bitwise": "off",
83
85
  "no-caller": "error",
84
86
  "no-case-declarations": "error",
85
87
  "no-console": [
@@ -91,7 +93,7 @@ const suggestionsRules = {
91
93
  "no-continue": "off",
92
94
  "no-delete-var": "error",
93
95
  "no-div-regex": "error",
94
- "no-else-return": "error",
96
+ "no-else-return": "off",
95
97
  "no-empty": "error",
96
98
  "no-empty-function": "error",
97
99
  "no-empty-static-block": "error",
@@ -198,7 +200,7 @@ const suggestionsRules = {
198
200
  "no-useless-call": "error",
199
201
  "no-useless-catch": "error",
200
202
  "no-useless-computed-key": "error",
201
- "no-useless-concat": "error",
203
+ "no-useless-concat": "off",
202
204
  "no-useless-constructor": "error",
203
205
  "no-useless-escape": "error",
204
206
  "no-useless-rename": "error",
@@ -209,7 +211,7 @@ const suggestionsRules = {
209
211
  "no-with": "error",
210
212
  "object-shorthand": ["error", "properties"],
211
213
  "one-var": ["error", "never"],
212
- "operator-assignment": ["error", "always"],
214
+ "operator-assignment": "off",
213
215
  "prefer-arrow-callback": "error",
214
216
  "prefer-const": "error",
215
217
  "prefer-destructuring": "error",
@@ -0,0 +1,50 @@
1
+ import { pickUnicornRulesForLanguage } from "./_common/_exports.js";
2
+ import {
3
+ betterTailwindcssRules,
4
+ commandRules,
5
+ dependRules,
6
+ eslintCommentsRules,
7
+ importXRules,
8
+ jsdocRules,
9
+ layoutAndFormattingRules,
10
+ noSecretsRules,
11
+ perfectionistRules,
12
+ possibleProblemsRules,
13
+ promiseRules,
14
+ reactRules,
15
+ regexpRules,
16
+ securityRules,
17
+ sonarjsRules,
18
+ stylisticRules,
19
+ suggestionsRules
20
+ } from "./rules/_exports.js";
21
+
22
+ /**
23
+ * @import { Linter } from "eslint";
24
+ */
25
+
26
+ /**
27
+ * @satisfies {Linter.RulesRecord}
28
+ */
29
+ const rules = {
30
+ ...betterTailwindcssRules,
31
+ ...commandRules,
32
+ ...dependRules,
33
+ ...eslintCommentsRules,
34
+ ...importXRules,
35
+ ...jsdocRules,
36
+ ...layoutAndFormattingRules,
37
+ ...noSecretsRules,
38
+ ...perfectionistRules,
39
+ ...possibleProblemsRules,
40
+ ...promiseRules,
41
+ ...reactRules,
42
+ ...regexpRules,
43
+ ...securityRules,
44
+ ...sonarjsRules,
45
+ ...stylisticRules,
46
+ ...suggestionsRules,
47
+ ...pickUnicornRulesForLanguage("js/js")
48
+ };
49
+
50
+ export default rules;
@@ -0,0 +1,6 @@
1
+ import convertExtensionsToGlob from "../_common/convert-extensions-to-glob.js";
2
+ import tsExtensions from "../_common/ts-extensions.js";
3
+
4
+ const tsGlob = convertExtensionsToGlob(tsExtensions);
5
+
6
+ export default tsGlob;