@haltcase/style 6.2.1 → 7.0.0-canary.1

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 (59) hide show
  1. package/eslint/configs/browser.js +19 -0
  2. package/eslint/configs/cjs.js +1 -0
  3. package/eslint/configs/internal/base.js +180 -0
  4. package/eslint/configs/internal/commonjs.js +22 -0
  5. package/eslint/{rules → configs/internal}/es2015.js +14 -16
  6. package/eslint/configs/internal/simple-import-sort.js +24 -0
  7. package/eslint/configs/internal/tsdoc.js +17 -0
  8. package/eslint/{rules → configs/internal}/unicorn.js +116 -121
  9. package/eslint/configs/next.js +36 -0
  10. package/eslint/configs/node.js +19 -0
  11. package/eslint/configs/playwright-test.js +17 -0
  12. package/eslint/configs/react.js +54 -0
  13. package/eslint/configs/typescript.js +84 -0
  14. package/eslint/constants.js +12 -28
  15. package/eslint/index.js +27 -0
  16. package/eslint/rules/best-practice.js +250 -245
  17. package/eslint/rules/imports.js +94 -0
  18. package/eslint/rules/jsx-a11y.js +11 -10
  19. package/eslint/rules/playwright-test.js +25 -26
  20. package/eslint/rules/possible-errors.js +38 -45
  21. package/eslint/rules/react.js +105 -104
  22. package/eslint/rules/stylistic.js +83 -84
  23. package/eslint/rules/typescript/extension.js +55 -39
  24. package/eslint/rules/typescript/import.js +16 -15
  25. package/eslint/rules/typescript/index.js +109 -121
  26. package/eslint/rules/typescript/naming-convention.js +71 -0
  27. package/eslint/rules/variables.js +34 -34
  28. package/eslint/withFiles.js +15 -0
  29. package/package.json +58 -56
  30. package/prettier/index.js +4 -11
  31. package/readme.md +181 -98
  32. package/stylelint/_base.js +2 -4
  33. package/stylelint/index.js +6 -7
  34. package/stylelint/modules.js +7 -8
  35. package/stylelint/standard.js +2 -5
  36. package/typescript/tsconfig.base.json +2 -1
  37. package/typescript/tsconfig.bundler.json +7 -3
  38. package/typescript/tsconfig.next.json +14 -6
  39. package/typescript/tsconfig.node.json +1 -1
  40. package/typescript/tsconfig.node18.json +4 -7
  41. package/typescript/tsconfig.node20.json +4 -7
  42. package/typescript/tsconfig.node22.json +10 -0
  43. package/typescript/tsconfig.web.json +1 -1
  44. package/eslint/_base.js +0 -82
  45. package/eslint/astro.js +0 -40
  46. package/eslint/browser.js +0 -8
  47. package/eslint/cjs.js +0 -12
  48. package/eslint/jest.js +0 -28
  49. package/eslint/next.js +0 -38
  50. package/eslint/node.js +0 -8
  51. package/eslint/playwright-test.js +0 -8
  52. package/eslint/react.js +0 -18
  53. package/eslint/rules/import.js +0 -92
  54. package/eslint/rules/jest.js +0 -28
  55. package/eslint/rules/simple-import-sort.js +0 -23
  56. package/eslint/rules/tsdoc.js +0 -17
  57. package/eslint/rules/typescript/strict.js +0 -18
  58. package/eslint/typescript.js +0 -26
  59. package/eslint/utils/require-package.js +0 -44
@@ -1,251 +1,256 @@
1
- "use strict";
2
-
3
- const {
4
- levels: { warn, error }
5
- } = require("../constants");
1
+ /**
2
+ * @import { Linter } from "eslint"
3
+ */
6
4
 
5
+ /**
6
+ * @type {Linter.RulesRecord}
7
+ */
7
8
  const commentsRules = {
8
- "eslint-comments/disable-enable-pair": [error, { allowWholeFile: true }]
9
+ "@eslint-community/eslint-comments/disable-enable-pair": [
10
+ "error",
11
+ { allowWholeFile: true }
12
+ ]
9
13
  };
10
14
 
11
- module.exports = {
12
- rules: {
13
- ...commentsRules,
15
+ /**
16
+ * @type {Linter.RulesRecord}
17
+ */
18
+ export const bestPracticeRules = {
19
+ ...commentsRules,
14
20
 
15
- /**
16
- * Require return statements in array methods callbacks.
17
- *
18
- * 🚫 Not fixable -https://eslint.org/docs/rules/array-callback-return
19
- */
20
- "array-callback-return": [error, { allowImplicit: true }],
21
- /**
22
- * Treat `var` statements as if they were block scoped.
23
- *
24
- * 🚫 Not fixable - https://eslint.org/docs/rules/block-scoped-var
25
- */
26
- "block-scoped-var": error,
27
- /**
28
- * Require curly braces for multiline blocks.
29
- *
30
- * 🔧 Fixable - https://eslint.org/docs/rules/curly
31
- */
32
- curly: [warn, "multi-line"],
33
- /**
34
- * Require default clauses in switch statements to be last (if used).
35
- *
36
- * 🚫 Not fixable - https://eslint.org/docs/rules/default-case-last
37
- */
38
- "default-case-last": error,
39
- /**
40
- * Require triple equals (`===` and `!==`).
41
- *
42
- * 🔧 Fixable - https://eslint.org/docs/rules/eqeqeq
43
- */
44
- eqeqeq: [error, "always", { null: "ignore" }],
45
- /**
46
- * Require grouped accessor pairs in object literals and classes.
47
- *
48
- * 🚫 Not fixable - https://eslint.org/docs/rules/grouped-accessor-pairs
49
- */
50
- "grouped-accessor-pairs": error,
51
- /**
52
- * Disallow use of `alert()`.
53
- *
54
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-alert
55
- */
56
- "no-alert": error,
57
- /**
58
- * Disallow use of `caller`/`callee`.
59
- *
60
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-caller
61
- */
62
- "no-caller": error,
63
- /**
64
- * Disallow returning value in constructor.
65
- *
66
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-constructor-return
67
- */
68
- "no-constructor-return": error,
69
- /**
70
- * Disallow using an `else` if the `if` block contains a return.
71
- *
72
- * 🔧 Fixable - https://eslint.org/docs/rules/no-else-return
73
- */
74
- "no-else-return": warn,
75
- /**
76
- * Disallow `eval()`.
77
- *
78
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-eval
79
- */
80
- "no-eval": error,
81
- /**
82
- * Disallow extending native objects.
83
- *
84
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-extend-native
85
- */
86
- "no-extend-native": error,
87
- /**
88
- * Disallow unnecessary function binding.
89
- *
90
- * 🔧 Fixable - https://eslint.org/docs/rules/no-extra-bind
91
- */
92
- "no-extra-bind": error,
93
- /**
94
- * Disallow unnecessary labels.
95
- *
96
- * 🔧 Fixable - https://eslint.org/docs/rules/no-extra-label
97
- */
98
- "no-extra-label": error,
99
- /**
100
- * Disallow floating decimals.
101
- *
102
- * 🔧 Fixable - https://eslint.org/docs/rules/no-floating-decimal
103
- */
104
- "no-floating-decimal": error,
105
- /**
106
- * Require converting types explicitly, e.g., `Boolean(foo)` instead of `!!foo`.
107
- *
108
- * 🔧 Partially Fixable - https://eslint.org/docs/rules/no-implicit-coercion
109
- */
110
- "no-implicit-coercion": error,
111
- /**
112
- * Disallow use of `eval()`-like methods.
113
- *
114
- * https://eslint.org/docs/rules/no-implied-eval
115
- */
116
- "no-implied-eval": error,
117
- /**
118
- * Disallow usage of `__iterator__` property.
119
- *
120
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-iterator
121
- */
122
- "no-iterator": error,
123
- /**
124
- * Disallow use of labels.
125
- *
126
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-labels
127
- */
128
- "no-labels": error,
129
- /**
130
- * Disallow unnecessary nested blocks.
131
- *
132
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-lone-blocks
133
- */
134
- "no-lone-blocks": error,
135
- /**
136
- * Disallow `new` for side effects.
137
- *
138
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-new
139
- */
140
- "no-new": error,
141
- /**
142
- * Disallow function constructors.
143
- *
144
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-new-func
145
- */
146
- "no-new-func": error,
147
- /**
148
- * Disallow primitive wrapper instances, such as `new String('foo')`.
149
- *
150
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-new-wrappers
151
- */
152
- "no-new-wrappers": error,
153
- /**
154
- * Disallow use of octal escape sequences in string literals.
155
- *
156
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-octal-escape
157
- */
158
- "no-octal-escape": error,
159
- /**
160
- * Disallow reassignment of function parameters.
161
- *
162
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-param-reassign
163
- */
164
- "no-param-reassign": error,
165
- /**
166
- * Disallow usage of the deprecated `__proto__` property.
167
- *
168
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-proto
169
- */
170
- "no-proto": error,
171
- /**
172
- * Disallow assignment in `return` statement.
173
- *
174
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-return-assign
175
- */
176
- "no-return-assign": error,
177
- /**
178
- * Disallow unnecessary `return await`.
179
- *
180
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-return-await
181
- */
182
- "no-return-await": error,
183
- /**
184
- * Disallow use of `javascript:` urls.
185
- *
186
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-script-url
187
- */
188
- "no-script-url": error,
189
- /**
190
- * Disallow comparisons where both sides are exactly the same.
191
- *
192
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-self-compare
193
- */
194
- "no-self-compare": error,
195
- /**
196
- * Disallow use of comma operator.
197
- *
198
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-sequences
199
- */
200
- "no-sequences": error,
201
- /**
202
- * Disallow unnecessary `.call()` and `.apply()`.
203
- *
204
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-useless-call
205
- */
206
- "no-useless-call": error,
207
- /**
208
- * Disallow unnecessary concatenation of strings.
209
- *
210
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-useless-concat
211
- */
212
- "no-useless-concat": error,
213
- /**
214
- * Disallow redundant return statements.
215
- *
216
- * 🔧 Fixable - https://eslint.org/docs/rules/no-useless-return
217
- */
218
- "no-useless-return": warn,
219
- /**
220
- * Require using named capture groups in regular expressions.
221
- *
222
- * 🚫 Not fixable - https://eslint.org/docs/rules/prefer-named-capture-group
223
- */
224
- "prefer-named-capture-group": error,
225
- /**
226
- * Require using Error objects as Promise rejection reasons.
227
- *
228
- * 🚫 Not fixable - https://eslint.org/docs/rules/prefer-promise-reject-errors
229
- */
230
- "prefer-promise-reject-errors": [error, { allowEmptyReject: true }],
231
- /**
232
- * Disallow use of the RegExp constructor in favor of regular expression
233
- * literals.
234
- *
235
- * 🚫 Not fixable - https://eslint.org/docs/rules/prefer-regex-literals
236
- */
237
- "prefer-regex-literals": error,
238
- /**
239
- * Disallow the `"use strict"` directive (we assume ESM by default).
240
- *
241
- * 🔧 Fixable - https://eslint.org/docs/latest/rules/strict
242
- */
243
- strict: [error, "never"],
244
- /**
245
- * Disallow "Yoda conditions".
246
- *
247
- * 🔧 Fixable - https://eslint.org/docs/rules/yoda
248
- */
249
- yoda: error
250
- }
21
+ /**
22
+ * Require return statements in array methods callbacks.
23
+ *
24
+ * 🚫 Not fixable -https://eslint.org/docs/rules/array-callback-return
25
+ */
26
+ "array-callback-return": ["error", { allowImplicit: true }],
27
+ /**
28
+ * Treat `var` statements as if they were block scoped.
29
+ *
30
+ * 🚫 Not fixable - https://eslint.org/docs/rules/block-scoped-var
31
+ */
32
+ "block-scoped-var": "error",
33
+ /**
34
+ * Require curly braces for multiline blocks.
35
+ *
36
+ * 🔧 Fixable - https://eslint.org/docs/rules/curly
37
+ */
38
+ curly: ["warn", "multi-line"],
39
+ /**
40
+ * Require default clauses in switch statements to be last (if used).
41
+ *
42
+ * 🚫 Not fixable - https://eslint.org/docs/rules/default-case-last
43
+ */
44
+ "default-case-last": "error",
45
+ /**
46
+ * Require triple equals (`===` and `!==`).
47
+ *
48
+ * 🔧 Fixable - https://eslint.org/docs/rules/eqeqeq
49
+ */
50
+ eqeqeq: ["error", "always", { null: "ignore" }],
51
+ /**
52
+ * Require grouped accessor pairs in object literals and classes.
53
+ *
54
+ * 🚫 Not fixable - https://eslint.org/docs/rules/grouped-accessor-pairs
55
+ */
56
+ "grouped-accessor-pairs": "error",
57
+ /**
58
+ * Disallow use of `alert()`.
59
+ *
60
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-alert
61
+ */
62
+ "no-alert": "error",
63
+ /**
64
+ * Disallow use of `caller`/`callee`.
65
+ *
66
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-caller
67
+ */
68
+ "no-caller": "error",
69
+ /**
70
+ * Disallow returning value in constructor.
71
+ *
72
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-constructor-return
73
+ */
74
+ "no-constructor-return": "error",
75
+ /**
76
+ * Disallow using an `else` if the `if` block contains a return.
77
+ *
78
+ * 🔧 Fixable - https://eslint.org/docs/rules/no-else-return
79
+ */
80
+ "no-else-return": "warn",
81
+ /**
82
+ * Disallow `eval()`.
83
+ *
84
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-eval
85
+ */
86
+ "no-eval": "error",
87
+ /**
88
+ * Disallow extending native objects.
89
+ *
90
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-extend-native
91
+ */
92
+ "no-extend-native": "error",
93
+ /**
94
+ * Disallow unnecessary function binding.
95
+ *
96
+ * 🔧 Fixable - https://eslint.org/docs/rules/no-extra-bind
97
+ */
98
+ "no-extra-bind": "error",
99
+ /**
100
+ * Disallow unnecessary labels.
101
+ *
102
+ * 🔧 Fixable - https://eslint.org/docs/rules/no-extra-label
103
+ */
104
+ "no-extra-label": "error",
105
+ /**
106
+ * Disallow floating decimals.
107
+ *
108
+ * 🔧 Fixable - https://eslint.org/docs/rules/no-floating-decimal
109
+ */
110
+ "no-floating-decimal": "error",
111
+ /**
112
+ * Require converting types explicitly, e.g., `Boolean(foo)` instead of `!!foo`.
113
+ *
114
+ * 🔧 Partially fixable - https://eslint.org/docs/rules/no-implicit-coercion
115
+ */
116
+ "no-implicit-coercion": "error",
117
+ /**
118
+ * Disallow use of `eval()`-like methods.
119
+ *
120
+ * https://eslint.org/docs/rules/no-implied-eval
121
+ */
122
+ "no-implied-eval": "error",
123
+ /**
124
+ * Disallow usage of `__iterator__` property.
125
+ *
126
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-iterator
127
+ */
128
+ "no-iterator": "error",
129
+ /**
130
+ * Disallow use of labels.
131
+ *
132
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-labels
133
+ */
134
+ "no-labels": "error",
135
+ /**
136
+ * Disallow unnecessary nested blocks.
137
+ *
138
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-lone-blocks
139
+ */
140
+ "no-lone-blocks": "error",
141
+ /**
142
+ * Disallow `new` for side effects.
143
+ *
144
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-new
145
+ */
146
+ "no-new": "error",
147
+ /**
148
+ * Disallow function constructors.
149
+ *
150
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-new-func
151
+ */
152
+ "no-new-func": "error",
153
+ /**
154
+ * Disallow primitive wrapper instances, such as `new String('foo')`.
155
+ *
156
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-new-wrappers
157
+ */
158
+ "no-new-wrappers": "error",
159
+ /**
160
+ * Disallow use of octal escape sequences in string literals.
161
+ *
162
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-octal-escape
163
+ */
164
+ "no-octal-escape": "error",
165
+ /**
166
+ * Disallow reassignment of function parameters.
167
+ *
168
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-param-reassign
169
+ */
170
+ "no-param-reassign": "error",
171
+ /**
172
+ * Disallow usage of the deprecated `__proto__` property.
173
+ *
174
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-proto
175
+ */
176
+ "no-proto": "error",
177
+ /**
178
+ * Disallow assignment in `return` statement.
179
+ *
180
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-return-assign
181
+ */
182
+ "no-return-assign": "error",
183
+ /**
184
+ * Disallow unnecessary `return await`.
185
+ *
186
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-return-await
187
+ */
188
+ "no-return-await": "error",
189
+ /**
190
+ * Disallow use of `javascript:` urls.
191
+ *
192
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-script-url
193
+ */
194
+ "no-script-url": "error",
195
+ /**
196
+ * Disallow comparisons where both sides are exactly the same.
197
+ *
198
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-self-compare
199
+ */
200
+ "no-self-compare": "error",
201
+ /**
202
+ * Disallow use of comma operator.
203
+ *
204
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-sequences
205
+ */
206
+ "no-sequences": "error",
207
+ /**
208
+ * Disallow unnecessary `.call()` and `.apply()`.
209
+ *
210
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-useless-call
211
+ */
212
+ "no-useless-call": "error",
213
+ /**
214
+ * Disallow unnecessary concatenation of strings.
215
+ *
216
+ * 🚫 Not fixable - https://eslint.org/docs/rules/no-useless-concat
217
+ */
218
+ "no-useless-concat": "error",
219
+ /**
220
+ * Disallow redundant return statements.
221
+ *
222
+ * 🔧 Fixable - https://eslint.org/docs/rules/no-useless-return
223
+ */
224
+ "no-useless-return": "warn",
225
+ /**
226
+ * Require using named capture groups in regular expressions.
227
+ *
228
+ * 🚫 Not fixable - https://eslint.org/docs/rules/prefer-named-capture-group
229
+ */
230
+ "prefer-named-capture-group": "error",
231
+ /**
232
+ * Require using Error objects as Promise rejection reasons.
233
+ *
234
+ * 🚫 Not fixable - https://eslint.org/docs/rules/prefer-promise-reject-errors
235
+ */
236
+ "prefer-promise-reject-errors": ["error", { allowEmptyReject: true }],
237
+ /**
238
+ * Disallow use of the RegExp constructor in favor of regular expression
239
+ * literals.
240
+ *
241
+ * 🚫 Not fixable - https://eslint.org/docs/rules/prefer-regex-literals
242
+ */
243
+ "prefer-regex-literals": "error",
244
+ /**
245
+ * Disallow the `"use strict"` directive (we assume ESM by default).
246
+ *
247
+ * 🔧 Fixable - https://eslint.org/docs/latest/rules/strict
248
+ */
249
+ strict: ["error", "never"],
250
+ /**
251
+ * Disallow "Yoda conditions".
252
+ *
253
+ * 🔧 Fixable - https://eslint.org/docs/rules/yoda
254
+ */
255
+ yoda: "error"
251
256
  };
@@ -0,0 +1,94 @@
1
+ /**
2
+ * @import { Linter } from "eslint"
3
+ */
4
+
5
+ /**
6
+ * @type {Linter.RulesRecord}
7
+ */
8
+ const disabledRules = {
9
+ /**
10
+ * Enforce a module import order convention.
11
+ * This is disabled as it is covered by `eslint-plugin-simple-import-sort`.
12
+ *
13
+ * 🔧 Fixable - https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/order.md
14
+ */
15
+ "import-x/order": "off"
16
+ };
17
+
18
+ /**
19
+ * @type {Linter.RulesRecord}
20
+ */
21
+ export const importRules = {
22
+ ...disabledRules,
23
+ /**
24
+ * Disallow non-import statements appearing before import statements.
25
+ *
26
+ * 🚫 Not fixable - https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/first.md
27
+ */
28
+ "import-x/first": "error",
29
+ /**
30
+ * Require a newline after the last import-x/require.
31
+ *
32
+ * 🔧 Fixable - https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/newline-after-import.md
33
+ */
34
+ "import-x/newline-after-import": "warn",
35
+ /**
36
+ * Disallow import of modules using absolute paths.
37
+ *
38
+ * 🚫 Not fixable - https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-absolute-path.md
39
+ */
40
+ "import-x/no-absolute-path": "error",
41
+ /**
42
+ * Disallow cyclical dependencies between modules.
43
+ *
44
+ * 🚫 Not fixable - https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-cycle.md
45
+ */
46
+ "import-x/no-cycle": "error",
47
+ /**
48
+ * Disallow default exports.
49
+ *
50
+ * 🚫 Not fixable - https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-default-export.md
51
+ */
52
+ "import-x/no-default-export": "error",
53
+ /**
54
+ * Combine separate imports of resolved paths.
55
+ *
56
+ * 🔧 Fixable - https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-duplicates.md
57
+ */
58
+ "import-x/no-duplicates": [
59
+ "error",
60
+ {
61
+ considerQueryString: true
62
+ }
63
+ ],
64
+ /**
65
+ * Disallow the use of extraneous packages.
66
+ *
67
+ * 🚫 Not fixable - https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-extraneous-dependencies.md
68
+ */
69
+ "import-x/no-extraneous-dependencies": ["error", { includeTypes: true }],
70
+ /**
71
+ * Disallow mutable exports.
72
+ *
73
+ * 🚫 Not fixable - https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-mutable-exports.md
74
+ */
75
+ "import-x/no-mutable-exports": "error",
76
+ /**
77
+ * Disallow importing packages through relative paths.
78
+ *
79
+ * 🚫 Not fixable - https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-relative-packages.md
80
+ */
81
+ "import-x/no-relative-packages": "warn",
82
+ /**
83
+ * Disallow a module from importing itself.
84
+ *
85
+ * 🚫 Not fixable - https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-self-import.md
86
+ */
87
+ "import-x/no-self-import": "error",
88
+ /**
89
+ * Ensures that there are no useless path segments.
90
+ *
91
+ * 🚫 Not fixable - https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/no-useless-path-segments.md
92
+ */
93
+ "import-x/no-useless-path-segments": ["error"]
94
+ };
@@ -1,20 +1,21 @@
1
- "use strict";
2
-
3
- const {
4
- levels: { off }
5
- } = require("../constants");
1
+ /**
2
+ * @import { Linter } from "eslint"
3
+ */
6
4
 
7
5
  /**
8
6
  * These are enabled by `jsx-a11y/recommended`, but we've made the decision to
9
7
  * disable them.
8
+ *
9
+ * @type {Linter.RulesRecord}
10
10
  */
11
11
  const disabledRules = {
12
12
  // This rule has been deprecated, but not yet removed.
13
- "jsx-a11y/no-onchange": off
13
+ "jsx-a11y/no-onchange": "off"
14
14
  };
15
15
 
16
- module.exports = {
17
- rules: {
18
- ...disabledRules
19
- }
16
+ /**
17
+ * @type {Linter.RulesRecord}
18
+ */
19
+ export const jsxA11yRules = {
20
+ ...disabledRules
20
21
  };