eslint 9.29.0 → 9.30.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 (87) hide show
  1. package/lib/config/config-loader.js +2 -29
  2. package/lib/config/flat-config-array.js +1 -1
  3. package/lib/eslint/eslint.js +1 -1
  4. package/lib/languages/js/source-code/source-code.js +7 -0
  5. package/lib/rules/array-bracket-newline.js +3 -3
  6. package/lib/rules/array-bracket-spacing.js +3 -3
  7. package/lib/rules/array-element-newline.js +3 -3
  8. package/lib/rules/arrow-parens.js +3 -3
  9. package/lib/rules/arrow-spacing.js +3 -3
  10. package/lib/rules/block-spacing.js +3 -3
  11. package/lib/rules/brace-style.js +3 -3
  12. package/lib/rules/comma-dangle.js +3 -3
  13. package/lib/rules/comma-spacing.js +3 -3
  14. package/lib/rules/comma-style.js +3 -3
  15. package/lib/rules/computed-property-spacing.js +3 -3
  16. package/lib/rules/dot-location.js +3 -3
  17. package/lib/rules/eol-last.js +3 -3
  18. package/lib/rules/func-call-spacing.js +3 -3
  19. package/lib/rules/function-call-argument-newline.js +3 -3
  20. package/lib/rules/function-paren-newline.js +3 -3
  21. package/lib/rules/generator-star-spacing.js +3 -3
  22. package/lib/rules/implicit-arrow-linebreak.js +3 -3
  23. package/lib/rules/indent-legacy.js +3 -3
  24. package/lib/rules/indent.js +3 -3
  25. package/lib/rules/jsx-quotes.js +3 -3
  26. package/lib/rules/key-spacing.js +3 -3
  27. package/lib/rules/keyword-spacing.js +3 -3
  28. package/lib/rules/line-comment-position.js +3 -3
  29. package/lib/rules/linebreak-style.js +3 -3
  30. package/lib/rules/lines-around-comment.js +3 -3
  31. package/lib/rules/lines-around-directive.js +3 -3
  32. package/lib/rules/lines-between-class-members.js +3 -3
  33. package/lib/rules/max-len.js +3 -3
  34. package/lib/rules/max-statements-per-line.js +3 -3
  35. package/lib/rules/multiline-comment-style.js +3 -3
  36. package/lib/rules/multiline-ternary.js +3 -3
  37. package/lib/rules/new-parens.js +3 -3
  38. package/lib/rules/newline-after-var.js +3 -3
  39. package/lib/rules/newline-before-return.js +3 -3
  40. package/lib/rules/newline-per-chained-call.js +3 -3
  41. package/lib/rules/no-confusing-arrow.js +3 -3
  42. package/lib/rules/no-duplicate-imports.js +65 -7
  43. package/lib/rules/no-extra-parens.js +3 -3
  44. package/lib/rules/no-extra-semi.js +3 -3
  45. package/lib/rules/no-floating-decimal.js +3 -3
  46. package/lib/rules/no-mixed-operators.js +3 -3
  47. package/lib/rules/no-mixed-spaces-and-tabs.js +3 -3
  48. package/lib/rules/no-multi-spaces.js +3 -3
  49. package/lib/rules/no-multiple-empty-lines.js +3 -3
  50. package/lib/rules/no-restricted-properties.js +11 -2
  51. package/lib/rules/no-spaced-func.js +3 -3
  52. package/lib/rules/no-tabs.js +3 -3
  53. package/lib/rules/no-trailing-spaces.js +3 -3
  54. package/lib/rules/no-unused-vars.js +1 -1
  55. package/lib/rules/no-whitespace-before-property.js +3 -3
  56. package/lib/rules/nonblock-statement-body-position.js +3 -3
  57. package/lib/rules/object-curly-newline.js +3 -3
  58. package/lib/rules/object-curly-spacing.js +3 -3
  59. package/lib/rules/object-property-newline.js +3 -3
  60. package/lib/rules/one-var-declaration-per-line.js +3 -3
  61. package/lib/rules/operator-linebreak.js +3 -3
  62. package/lib/rules/padded-blocks.js +3 -3
  63. package/lib/rules/padding-line-between-statements.js +3 -3
  64. package/lib/rules/quote-props.js +3 -3
  65. package/lib/rules/quotes.js +3 -3
  66. package/lib/rules/rest-spread-spacing.js +3 -3
  67. package/lib/rules/semi-spacing.js +3 -3
  68. package/lib/rules/semi-style.js +3 -3
  69. package/lib/rules/semi.js +3 -3
  70. package/lib/rules/space-before-blocks.js +3 -3
  71. package/lib/rules/space-before-function-paren.js +3 -3
  72. package/lib/rules/space-in-parens.js +3 -3
  73. package/lib/rules/space-infix-ops.js +3 -3
  74. package/lib/rules/space-unary-ops.js +3 -3
  75. package/lib/rules/spaced-comment.js +3 -3
  76. package/lib/rules/switch-colon-spacing.js +3 -3
  77. package/lib/rules/template-curly-spacing.js +3 -3
  78. package/lib/rules/template-tag-spacing.js +3 -3
  79. package/lib/rules/utils/ast-utils.js +45 -0
  80. package/lib/rules/wrap-iife.js +3 -3
  81. package/lib/rules/wrap-regex.js +3 -3
  82. package/lib/rules/yield-star-spacing.js +3 -3
  83. package/lib/shared/flags.js +9 -1
  84. package/lib/shared/runtime-info.js +1 -1
  85. package/lib/types/index.d.ts +7 -0
  86. package/lib/types/rules.d.ts +78 -74
  87. package/package.json +4 -4
@@ -34,12 +34,12 @@ module.exports = {
34
34
  "ESLint Stylistic now maintains deprecated stylistic core rules.",
35
35
  url: "https://eslint.style/guide/migration",
36
36
  plugin: {
37
- name: "@stylistic/eslint-plugin-js",
38
- url: "https://eslint.style/packages/js",
37
+ name: "@stylistic/eslint-plugin",
38
+ url: "https://eslint.style",
39
39
  },
40
40
  rule: {
41
41
  name: "new-parens",
42
- url: "https://eslint.style/rules/js/new-parens",
42
+ url: "https://eslint.style/rules/new-parens",
43
43
  },
44
44
  },
45
45
  ],
@@ -48,12 +48,12 @@ module.exports = {
48
48
  message: "The new rule moved to a plugin.",
49
49
  url: "https://eslint.org/docs/latest/rules/padding-line-between-statements#examples",
50
50
  plugin: {
51
- name: "@stylistic/eslint-plugin-js",
52
- url: "https://eslint.style/packages/js",
51
+ name: "@stylistic/eslint-plugin",
52
+ url: "https://eslint.style",
53
53
  },
54
54
  rule: {
55
55
  name: "padding-line-between-statements",
56
- url: "https://eslint.style/rules/js/padding-line-between-statements",
56
+ url: "https://eslint.style/rules/padding-line-between-statements",
57
57
  },
58
58
  },
59
59
  ],
@@ -36,12 +36,12 @@ module.exports = {
36
36
  message: "The new rule moved to a plugin.",
37
37
  url: "https://eslint.org/docs/latest/rules/padding-line-between-statements#examples",
38
38
  plugin: {
39
- name: "@stylistic/eslint-plugin-js",
40
- url: "https://eslint.style/packages/js",
39
+ name: "@stylistic/eslint-plugin",
40
+ url: "https://eslint.style",
41
41
  },
42
42
  rule: {
43
43
  name: "padding-line-between-statements",
44
- url: "https://eslint.style/rules/js/padding-line-between-statements",
44
+ url: "https://eslint.style/rules/padding-line-between-statements",
45
45
  },
46
46
  },
47
47
  ],
@@ -27,12 +27,12 @@ module.exports = {
27
27
  "ESLint Stylistic now maintains deprecated stylistic core rules.",
28
28
  url: "https://eslint.style/guide/migration",
29
29
  plugin: {
30
- name: "@stylistic/eslint-plugin-js",
31
- url: "https://eslint.style/packages/js",
30
+ name: "@stylistic/eslint-plugin",
31
+ url: "https://eslint.style",
32
32
  },
33
33
  rule: {
34
34
  name: "newline-per-chained-call",
35
- url: "https://eslint.style/rules/js/newline-per-chained-call",
35
+ url: "https://eslint.style/rules/newline-per-chained-call",
36
36
  },
37
37
  },
38
38
  ],
@@ -40,12 +40,12 @@ module.exports = {
40
40
  "ESLint Stylistic now maintains deprecated stylistic core rules.",
41
41
  url: "https://eslint.style/guide/migration",
42
42
  plugin: {
43
- name: "@stylistic/eslint-plugin-js",
44
- url: "https://eslint.style/packages/js",
43
+ name: "@stylistic/eslint-plugin",
44
+ url: "https://eslint.style",
45
45
  },
46
46
  rule: {
47
47
  name: "no-confusing-arrow",
48
- url: "https://eslint.style/rules/js/no-confusing-arrow",
48
+ url: "https://eslint.style/rules/no-confusing-arrow",
49
49
  },
50
50
  },
51
51
  ],
@@ -91,13 +91,33 @@ function isImportExportCanBeMerged(node1, node2) {
91
91
  * Returns a boolean if we should report (import|export).
92
92
  * @param {ASTNode} node A node to be reported or not.
93
93
  * @param {[ASTNode]} previousNodes An array contains previous nodes of the module imported or exported.
94
+ * @param {boolean} allowSeparateTypeImports Whether to allow separate type and value imports.
94
95
  * @returns {boolean} True if the (import|export) should be reported.
95
96
  */
96
- function shouldReportImportExport(node, previousNodes) {
97
+ function shouldReportImportExport(
98
+ node,
99
+ previousNodes,
100
+ allowSeparateTypeImports,
101
+ ) {
97
102
  let i = 0;
98
103
 
99
104
  while (i < previousNodes.length) {
100
- if (isImportExportCanBeMerged(node, previousNodes[i])) {
105
+ const previousNode = previousNodes[i];
106
+
107
+ if (allowSeparateTypeImports) {
108
+ const isTypeNode =
109
+ node.importKind === "type" || node.exportKind === "type";
110
+ const isTypePrevious =
111
+ previousNode.importKind === "type" ||
112
+ previousNode.exportKind === "type";
113
+
114
+ if (isTypeNode !== isTypePrevious) {
115
+ i++;
116
+ continue;
117
+ }
118
+ }
119
+
120
+ if (isImportExportCanBeMerged(node, previousNode)) {
101
121
  return true;
102
122
  }
103
123
  i++;
@@ -136,6 +156,7 @@ function getModule(node) {
136
156
  * @param {Map} modules A Map object contains as a key a module name and as value an array contains objects, each object contains a node and a declaration type.
137
157
  * @param {string} declarationType A declaration type can be an import or export.
138
158
  * @param {boolean} includeExports Whether or not to check for exports in addition to imports.
159
+ * @param {boolean} allowSeparateTypeImports Whether to allow separate type and value imports.
139
160
  * @returns {void} No return value.
140
161
  */
141
162
  function checkAndReport(
@@ -144,6 +165,7 @@ function checkAndReport(
144
165
  modules,
145
166
  declarationType,
146
167
  includeExports,
168
+ allowSeparateTypeImports,
147
169
  ) {
148
170
  const module = getModule(node);
149
171
 
@@ -157,19 +179,43 @@ function checkAndReport(
157
179
  exportNodes = getNodesByDeclarationType(previousNodes, "export");
158
180
  }
159
181
  if (declarationType === "import") {
160
- if (shouldReportImportExport(node, importNodes)) {
182
+ if (
183
+ shouldReportImportExport(
184
+ node,
185
+ importNodes,
186
+ allowSeparateTypeImports,
187
+ )
188
+ ) {
161
189
  messagesIds.push("import");
162
190
  }
163
191
  if (includeExports) {
164
- if (shouldReportImportExport(node, exportNodes)) {
192
+ if (
193
+ shouldReportImportExport(
194
+ node,
195
+ exportNodes,
196
+ allowSeparateTypeImports,
197
+ )
198
+ ) {
165
199
  messagesIds.push("importAs");
166
200
  }
167
201
  }
168
202
  } else if (declarationType === "export") {
169
- if (shouldReportImportExport(node, exportNodes)) {
203
+ if (
204
+ shouldReportImportExport(
205
+ node,
206
+ exportNodes,
207
+ allowSeparateTypeImports,
208
+ )
209
+ ) {
170
210
  messagesIds.push("export");
171
211
  }
172
- if (shouldReportImportExport(node, importNodes)) {
212
+ if (
213
+ shouldReportImportExport(
214
+ node,
215
+ importNodes,
216
+ allowSeparateTypeImports,
217
+ )
218
+ ) {
173
219
  messagesIds.push("exportAs");
174
220
  }
175
221
  }
@@ -196,6 +242,7 @@ function checkAndReport(
196
242
  * @param {Map} modules A Map object contains as a key a module name and as value an array contains objects, each object contains a node and a declaration type.
197
243
  * @param {string} declarationType A declaration type can be an import or export.
198
244
  * @param {boolean} includeExports Whether or not to check for exports in addition to imports.
245
+ * @param {boolean} allowSeparateTypeImports Whether to allow separate type and value imports.
199
246
  * @returns {nodeCallback} A function passed to ESLint to handle the statement.
200
247
  */
201
248
  function handleImportsExports(
@@ -203,6 +250,7 @@ function handleImportsExports(
203
250
  modules,
204
251
  declarationType,
205
252
  includeExports,
253
+ allowSeparateTypeImports,
206
254
  ) {
207
255
  return function (node) {
208
256
  const module = getModule(node);
@@ -214,6 +262,7 @@ function handleImportsExports(
214
262
  modules,
215
263
  declarationType,
216
264
  includeExports,
265
+ allowSeparateTypeImports,
217
266
  );
218
267
  const currentNode = { node, declarationType };
219
268
  let nodes = [currentNode];
@@ -231,11 +280,14 @@ function handleImportsExports(
231
280
  /** @type {import('../types').Rule.RuleModule} */
232
281
  module.exports = {
233
282
  meta: {
283
+ dialects: ["javascript", "typescript"],
284
+ language: "javascript",
234
285
  type: "problem",
235
286
 
236
287
  defaultOptions: [
237
288
  {
238
289
  includeExports: false,
290
+ allowSeparateTypeImports: false,
239
291
  },
240
292
  ],
241
293
 
@@ -252,6 +304,9 @@ module.exports = {
252
304
  includeExports: {
253
305
  type: "boolean",
254
306
  },
307
+ allowSeparateTypeImports: {
308
+ type: "boolean",
309
+ },
255
310
  },
256
311
  additionalProperties: false,
257
312
  },
@@ -266,7 +321,7 @@ module.exports = {
266
321
  },
267
322
 
268
323
  create(context) {
269
- const [{ includeExports }] = context.options;
324
+ const [{ includeExports, allowSeparateTypeImports }] = context.options;
270
325
  const modules = new Map();
271
326
  const handlers = {
272
327
  ImportDeclaration: handleImportsExports(
@@ -274,6 +329,7 @@ module.exports = {
274
329
  modules,
275
330
  "import",
276
331
  includeExports,
332
+ allowSeparateTypeImports,
277
333
  ),
278
334
  };
279
335
 
@@ -283,12 +339,14 @@ module.exports = {
283
339
  modules,
284
340
  "export",
285
341
  includeExports,
342
+ allowSeparateTypeImports,
286
343
  );
287
344
  handlers.ExportAllDeclaration = handleImportsExports(
288
345
  context,
289
346
  modules,
290
347
  "export",
291
348
  includeExports,
349
+ allowSeparateTypeImports,
292
350
  );
293
351
  }
294
352
  return handlers;
@@ -28,12 +28,12 @@ module.exports = {
28
28
  "ESLint Stylistic now maintains deprecated stylistic core rules.",
29
29
  url: "https://eslint.style/guide/migration",
30
30
  plugin: {
31
- name: "@stylistic/eslint-plugin-js",
32
- url: "https://eslint.style/packages/js",
31
+ name: "@stylistic/eslint-plugin",
32
+ url: "https://eslint.style",
33
33
  },
34
34
  rule: {
35
35
  name: "no-extra-parens",
36
- url: "https://eslint.style/rules/js/no-extra-parens",
36
+ url: "https://eslint.style/rules/no-extra-parens",
37
37
  },
38
38
  },
39
39
  ],
@@ -31,12 +31,12 @@ module.exports = {
31
31
  "ESLint Stylistic now maintains deprecated stylistic core rules.",
32
32
  url: "https://eslint.style/guide/migration",
33
33
  plugin: {
34
- name: "@stylistic/eslint-plugin-js",
35
- url: "https://eslint.style/packages/js",
34
+ name: "@stylistic/eslint-plugin",
35
+ url: "https://eslint.style",
36
36
  },
37
37
  rule: {
38
38
  name: "no-extra-semi",
39
- url: "https://eslint.style/rules/js/no-extra-semi",
39
+ url: "https://eslint.style/rules/no-extra-semi",
40
40
  },
41
41
  },
42
42
  ],
@@ -30,12 +30,12 @@ module.exports = {
30
30
  "ESLint Stylistic now maintains deprecated stylistic core rules.",
31
31
  url: "https://eslint.style/guide/migration",
32
32
  plugin: {
33
- name: "@stylistic/eslint-plugin-js",
34
- url: "https://eslint.style/packages/js",
33
+ name: "@stylistic/eslint-plugin",
34
+ url: "https://eslint.style",
35
35
  },
36
36
  rule: {
37
37
  name: "no-floating-decimal",
38
- url: "https://eslint.style/rules/js/no-floating-decimal",
38
+ url: "https://eslint.style/rules/no-floating-decimal",
39
39
  },
40
40
  },
41
41
  ],
@@ -97,12 +97,12 @@ module.exports = {
97
97
  "ESLint Stylistic now maintains deprecated stylistic core rules.",
98
98
  url: "https://eslint.style/guide/migration",
99
99
  plugin: {
100
- name: "@stylistic/eslint-plugin-js",
101
- url: "https://eslint.style/packages/js",
100
+ name: "@stylistic/eslint-plugin",
101
+ url: "https://eslint.style",
102
102
  },
103
103
  rule: {
104
104
  name: "no-mixed-operators",
105
- url: "https://eslint.style/rules/js/no-mixed-operators",
105
+ url: "https://eslint.style/rules/no-mixed-operators",
106
106
  },
107
107
  },
108
108
  ],
@@ -23,12 +23,12 @@ module.exports = {
23
23
  "ESLint Stylistic now maintains deprecated stylistic core rules.",
24
24
  url: "https://eslint.style/guide/migration",
25
25
  plugin: {
26
- name: "@stylistic/eslint-plugin-js",
27
- url: "https://eslint.style/packages/js",
26
+ name: "@stylistic/eslint-plugin",
27
+ url: "https://eslint.style",
28
28
  },
29
29
  rule: {
30
30
  name: "no-mixed-spaces-and-tabs",
31
- url: "https://eslint.style/rules/js/no-mixed-spaces-and-tabs",
31
+ url: "https://eslint.style/rules/no-mixed-spaces-and-tabs",
32
32
  },
33
33
  },
34
34
  ],
@@ -26,12 +26,12 @@ module.exports = {
26
26
  "ESLint Stylistic now maintains deprecated stylistic core rules.",
27
27
  url: "https://eslint.style/guide/migration",
28
28
  plugin: {
29
- name: "@stylistic/eslint-plugin-js",
30
- url: "https://eslint.style/packages/js",
29
+ name: "@stylistic/eslint-plugin",
30
+ url: "https://eslint.style",
31
31
  },
32
32
  rule: {
33
33
  name: "no-multi-spaces",
34
- url: "https://eslint.style/rules/js/no-multi-spaces",
34
+ url: "https://eslint.style/rules/no-multi-spaces",
35
35
  },
36
36
  },
37
37
  ],
@@ -24,12 +24,12 @@ module.exports = {
24
24
  "ESLint Stylistic now maintains deprecated stylistic core rules.",
25
25
  url: "https://eslint.style/guide/migration",
26
26
  plugin: {
27
- name: "@stylistic/eslint-plugin-js",
28
- url: "https://eslint.style/packages/js",
27
+ name: "@stylistic/eslint-plugin",
28
+ url: "https://eslint.style",
29
29
  },
30
30
  rule: {
31
31
  name: "no-multiple-empty-lines",
32
- url: "https://eslint.style/rules/js/no-multiple-empty-lines",
32
+ url: "https://eslint.style/rules/no-multiple-empty-lines",
33
33
  },
34
34
  },
35
35
  ],
@@ -73,10 +73,10 @@ module.exports = {
73
73
  messages: {
74
74
  restrictedObjectProperty:
75
75
  // eslint-disable-next-line eslint-plugin/report-message-format -- Custom message might not end in a period
76
- "'{{objectName}}.{{propertyName}}' is restricted from being used.{{message}}",
76
+ "'{{objectName}}.{{propertyName}}' is restricted from being used.{{allowedPropertiesMessage}}{{message}}",
77
77
  restrictedProperty:
78
78
  // eslint-disable-next-line eslint-plugin/report-message-format -- Custom message might not end in a period
79
- "'{{propertyName}}' is restricted from being used.{{message}}",
79
+ "'{{propertyName}}' is restricted from being used.{{allowedObjectsMessage}}{{message}}",
80
80
  },
81
81
  },
82
82
 
@@ -155,6 +155,10 @@ module.exports = {
155
155
  const message = matchedObjectProperty.message
156
156
  ? ` ${matchedObjectProperty.message}`
157
157
  : "";
158
+ const allowedPropertiesMessage =
159
+ matchedObjectProperty.allowProperties
160
+ ? ` Only these properties are allowed: ${matchedObjectProperty.allowProperties.join(", ")}.`
161
+ : "";
158
162
 
159
163
  context.report({
160
164
  node,
@@ -163,6 +167,7 @@ module.exports = {
163
167
  objectName,
164
168
  propertyName,
165
169
  message,
170
+ allowedPropertiesMessage,
166
171
  },
167
172
  });
168
173
  } else if (
@@ -172,6 +177,9 @@ module.exports = {
172
177
  const message = globalMatchedProperty.message
173
178
  ? ` ${globalMatchedProperty.message}`
174
179
  : "";
180
+ const allowedObjectsMessage = globalMatchedProperty.allowObjects
181
+ ? ` Property '${propertyName}' is only allowed on these objects: ${globalMatchedProperty.allowObjects.join(", ")}.`
182
+ : "";
175
183
 
176
184
  context.report({
177
185
  node,
@@ -179,6 +187,7 @@ module.exports = {
179
187
  data: {
180
188
  propertyName,
181
189
  message,
190
+ allowedObjectsMessage,
182
191
  },
183
192
  });
184
193
  }
@@ -33,12 +33,12 @@ module.exports = {
33
33
  "ESLint Stylistic now maintains deprecated stylistic core rules.",
34
34
  url: "https://eslint.style/guide/migration",
35
35
  plugin: {
36
- name: "@stylistic/eslint-plugin-js",
37
- url: "https://eslint.style/packages/js",
36
+ name: "@stylistic/eslint-plugin",
37
+ url: "https://eslint.style",
38
38
  },
39
39
  rule: {
40
40
  name: "function-call-spacing",
41
- url: "https://eslint.style/rules/js/function-call-spacing",
41
+ url: "https://eslint.style/rules/function-call-spacing",
42
42
  },
43
43
  },
44
44
  ],
@@ -31,12 +31,12 @@ module.exports = {
31
31
  "ESLint Stylistic now maintains deprecated stylistic core rules.",
32
32
  url: "https://eslint.style/guide/migration",
33
33
  plugin: {
34
- name: "@stylistic/eslint-plugin-js",
35
- url: "https://eslint.style/packages/js",
34
+ name: "@stylistic/eslint-plugin",
35
+ url: "https://eslint.style",
36
36
  },
37
37
  rule: {
38
38
  name: "no-tabs",
39
- url: "https://eslint.style/rules/js/no-tabs",
39
+ url: "https://eslint.style/rules/no-tabs",
40
40
  },
41
41
  },
42
42
  ],
@@ -37,12 +37,12 @@ module.exports = {
37
37
  "ESLint Stylistic now maintains deprecated stylistic core rules.",
38
38
  url: "https://eslint.style/guide/migration",
39
39
  plugin: {
40
- name: "@stylistic/eslint-plugin-js",
41
- url: "https://eslint.style/packages/js",
40
+ name: "@stylistic/eslint-plugin",
41
+ url: "https://eslint.style",
42
42
  },
43
43
  rule: {
44
44
  name: "no-trailing-spaces",
45
- url: "https://eslint.style/rules/js/no-trailing-spaces",
45
+ url: "https://eslint.style/rules/no-trailing-spaces",
46
46
  },
47
47
  },
48
48
  ],
@@ -1152,7 +1152,7 @@ module.exports = {
1152
1152
 
1153
1153
  // fix for { a: { b } }
1154
1154
  if (parentNode.parent.type === "ObjectPattern") {
1155
- // fix for unused variables in dectructured object with single property in variable decalartion and function parameter
1155
+ // fix for unused variables in destructured object with single property in variable declaration and function parameter
1156
1156
  if (parentNode.parent.properties.length === 1) {
1157
1157
  return fixVariables(parentNode.parent);
1158
1158
  }
@@ -29,12 +29,12 @@ module.exports = {
29
29
  "ESLint Stylistic now maintains deprecated stylistic core rules.",
30
30
  url: "https://eslint.style/guide/migration",
31
31
  plugin: {
32
- name: "@stylistic/eslint-plugin-js",
33
- url: "https://eslint.style/packages/js",
32
+ name: "@stylistic/eslint-plugin",
33
+ url: "https://eslint.style",
34
34
  },
35
35
  rule: {
36
36
  name: "no-whitespace-before-property",
37
- url: "https://eslint.style/rules/js/no-whitespace-before-property",
37
+ url: "https://eslint.style/rules/no-whitespace-before-property",
38
38
  },
39
39
  },
40
40
  ],
@@ -25,12 +25,12 @@ module.exports = {
25
25
  "ESLint Stylistic now maintains deprecated stylistic core rules.",
26
26
  url: "https://eslint.style/guide/migration",
27
27
  plugin: {
28
- name: "@stylistic/eslint-plugin-js",
29
- url: "https://eslint.style/packages/js",
28
+ name: "@stylistic/eslint-plugin",
29
+ url: "https://eslint.style",
30
30
  },
31
31
  rule: {
32
32
  name: "nonblock-statement-body-position",
33
- url: "https://eslint.style/rules/js/nonblock-statement-body-position",
33
+ url: "https://eslint.style/rules/nonblock-statement-body-position",
34
34
  },
35
35
  },
36
36
  ],
@@ -169,12 +169,12 @@ module.exports = {
169
169
  "ESLint Stylistic now maintains deprecated stylistic core rules.",
170
170
  url: "https://eslint.style/guide/migration",
171
171
  plugin: {
172
- name: "@stylistic/eslint-plugin-js",
173
- url: "https://eslint.style/packages/js",
172
+ name: "@stylistic/eslint-plugin",
173
+ url: "https://eslint.style",
174
174
  },
175
175
  rule: {
176
176
  name: "object-curly-newline",
177
- url: "https://eslint.style/rules/js/object-curly-newline",
177
+ url: "https://eslint.style/rules/object-curly-newline",
178
178
  },
179
179
  },
180
180
  ],
@@ -25,12 +25,12 @@ module.exports = {
25
25
  "ESLint Stylistic now maintains deprecated stylistic core rules.",
26
26
  url: "https://eslint.style/guide/migration",
27
27
  plugin: {
28
- name: "@stylistic/eslint-plugin-js",
29
- url: "https://eslint.style/packages/js",
28
+ name: "@stylistic/eslint-plugin",
29
+ url: "https://eslint.style",
30
30
  },
31
31
  rule: {
32
32
  name: "object-curly-spacing",
33
- url: "https://eslint.style/rules/js/object-curly-spacing",
33
+ url: "https://eslint.style/rules/object-curly-spacing",
34
34
  },
35
35
  },
36
36
  ],
@@ -24,12 +24,12 @@ module.exports = {
24
24
  "ESLint Stylistic now maintains deprecated stylistic core rules.",
25
25
  url: "https://eslint.style/guide/migration",
26
26
  plugin: {
27
- name: "@stylistic/eslint-plugin-js",
28
- url: "https://eslint.style/packages/js",
27
+ name: "@stylistic/eslint-plugin",
28
+ url: "https://eslint.style",
29
29
  },
30
30
  rule: {
31
31
  name: "object-property-newline",
32
- url: "https://eslint.style/rules/js/object-property-newline",
32
+ url: "https://eslint.style/rules/object-property-newline",
33
33
  },
34
34
  },
35
35
  ],
@@ -23,12 +23,12 @@ module.exports = {
23
23
  "ESLint Stylistic now maintains deprecated stylistic core rules.",
24
24
  url: "https://eslint.style/guide/migration",
25
25
  plugin: {
26
- name: "@stylistic/eslint-plugin-js",
27
- url: "https://eslint.style/packages/js",
26
+ name: "@stylistic/eslint-plugin",
27
+ url: "https://eslint.style",
28
28
  },
29
29
  rule: {
30
30
  name: "one-var-declaration-per-line",
31
- url: "https://eslint.style/rules/js/one-var-declaration-per-line",
31
+ url: "https://eslint.style/rules/one-var-declaration-per-line",
32
32
  },
33
33
  },
34
34
  ],
@@ -30,12 +30,12 @@ module.exports = {
30
30
  "ESLint Stylistic now maintains deprecated stylistic core rules.",
31
31
  url: "https://eslint.style/guide/migration",
32
32
  plugin: {
33
- name: "@stylistic/eslint-plugin-js",
34
- url: "https://eslint.style/packages/js",
33
+ name: "@stylistic/eslint-plugin",
34
+ url: "https://eslint.style",
35
35
  },
36
36
  rule: {
37
37
  name: "operator-linebreak",
38
- url: "https://eslint.style/rules/js/operator-linebreak",
38
+ url: "https://eslint.style/rules/operator-linebreak",
39
39
  },
40
40
  },
41
41
  ],
@@ -30,12 +30,12 @@ module.exports = {
30
30
  "ESLint Stylistic now maintains deprecated stylistic core rules.",
31
31
  url: "https://eslint.style/guide/migration",
32
32
  plugin: {
33
- name: "@stylistic/eslint-plugin-js",
34
- url: "https://eslint.style/packages/js",
33
+ name: "@stylistic/eslint-plugin",
34
+ url: "https://eslint.style",
35
35
  },
36
36
  rule: {
37
37
  name: "padded-blocks",
38
- url: "https://eslint.style/rules/js/padded-blocks",
38
+ url: "https://eslint.style/rules/padded-blocks",
39
39
  },
40
40
  },
41
41
  ],
@@ -400,12 +400,12 @@ module.exports = {
400
400
  "ESLint Stylistic now maintains deprecated stylistic core rules.",
401
401
  url: "https://eslint.style/guide/migration",
402
402
  plugin: {
403
- name: "@stylistic/eslint-plugin-js",
404
- url: "https://eslint.style/packages/js",
403
+ name: "@stylistic/eslint-plugin",
404
+ url: "https://eslint.style",
405
405
  },
406
406
  rule: {
407
407
  name: "padding-line-between-statements",
408
- url: "https://eslint.style/rules/js/padding-line-between-statements",
408
+ url: "https://eslint.style/rules/padding-line-between-statements",
409
409
  },
410
410
  },
411
411
  ],