eslint 9.28.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.
- package/README.md +1 -1
- package/conf/ecma-version.js +1 -1
- package/conf/globals.js +10 -0
- package/lib/cli.js +6 -11
- package/lib/config/config-loader.js +2 -29
- package/lib/config/flat-config-array.js +1 -1
- package/lib/eslint/eslint.js +14 -18
- package/lib/languages/js/source-code/source-code.js +81 -27
- package/lib/linter/apply-disable-directives.js +2 -4
- package/lib/linter/code-path-analysis/code-path-analyzer.js +8 -9
- package/lib/linter/linter.js +4 -4
- package/lib/linter/source-code-traverser.js +64 -49
- package/lib/linter/source-code-visitor.js +81 -0
- package/lib/rules/array-bracket-newline.js +3 -3
- package/lib/rules/array-bracket-spacing.js +3 -3
- package/lib/rules/array-element-newline.js +3 -3
- package/lib/rules/arrow-parens.js +3 -3
- package/lib/rules/arrow-spacing.js +3 -3
- package/lib/rules/block-spacing.js +3 -3
- package/lib/rules/brace-style.js +3 -3
- package/lib/rules/class-methods-use-this.js +7 -0
- package/lib/rules/comma-dangle.js +3 -3
- package/lib/rules/comma-spacing.js +3 -3
- package/lib/rules/comma-style.js +3 -3
- package/lib/rules/computed-property-spacing.js +3 -3
- package/lib/rules/dot-location.js +3 -3
- package/lib/rules/eol-last.js +3 -3
- package/lib/rules/func-call-spacing.js +3 -3
- package/lib/rules/function-call-argument-newline.js +3 -3
- package/lib/rules/function-paren-newline.js +3 -3
- package/lib/rules/generator-star-spacing.js +3 -3
- package/lib/rules/implicit-arrow-linebreak.js +3 -3
- package/lib/rules/indent-legacy.js +3 -3
- package/lib/rules/indent.js +3 -3
- package/lib/rules/jsx-quotes.js +3 -3
- package/lib/rules/key-spacing.js +3 -3
- package/lib/rules/keyword-spacing.js +3 -3
- package/lib/rules/line-comment-position.js +3 -3
- package/lib/rules/linebreak-style.js +3 -3
- package/lib/rules/lines-around-comment.js +3 -3
- package/lib/rules/lines-around-directive.js +3 -3
- package/lib/rules/lines-between-class-members.js +3 -3
- package/lib/rules/max-len.js +3 -3
- package/lib/rules/max-statements-per-line.js +3 -3
- package/lib/rules/multiline-comment-style.js +3 -3
- package/lib/rules/multiline-ternary.js +3 -3
- package/lib/rules/new-parens.js +3 -3
- package/lib/rules/newline-after-var.js +3 -3
- package/lib/rules/newline-before-return.js +3 -3
- package/lib/rules/newline-per-chained-call.js +3 -3
- package/lib/rules/no-confusing-arrow.js +3 -3
- package/lib/rules/no-duplicate-imports.js +65 -7
- package/lib/rules/no-extra-parens.js +3 -3
- package/lib/rules/no-extra-semi.js +3 -3
- package/lib/rules/no-floating-decimal.js +3 -3
- package/lib/rules/no-mixed-operators.js +3 -3
- package/lib/rules/no-mixed-spaces-and-tabs.js +3 -3
- package/lib/rules/no-multi-spaces.js +3 -3
- package/lib/rules/no-multiple-empty-lines.js +3 -3
- package/lib/rules/no-promise-executor-return.js +4 -35
- package/lib/rules/no-restricted-globals.js +35 -2
- package/lib/rules/no-restricted-properties.js +35 -12
- package/lib/rules/no-setter-return.js +13 -48
- package/lib/rules/no-spaced-func.js +3 -3
- package/lib/rules/no-tabs.js +3 -3
- package/lib/rules/no-trailing-spaces.js +3 -3
- package/lib/rules/no-unused-vars.js +1 -1
- package/lib/rules/no-use-before-define.js +2 -0
- package/lib/rules/no-var.js +14 -2
- package/lib/rules/no-whitespace-before-property.js +3 -3
- package/lib/rules/nonblock-statement-body-position.js +3 -3
- package/lib/rules/object-curly-newline.js +3 -3
- package/lib/rules/object-curly-spacing.js +3 -3
- package/lib/rules/object-property-newline.js +3 -3
- package/lib/rules/one-var-declaration-per-line.js +3 -3
- package/lib/rules/operator-linebreak.js +3 -3
- package/lib/rules/padded-blocks.js +3 -3
- package/lib/rules/padding-line-between-statements.js +3 -3
- package/lib/rules/prefer-regex-literals.js +1 -18
- package/lib/rules/quote-props.js +3 -3
- package/lib/rules/quotes.js +3 -3
- package/lib/rules/rest-spread-spacing.js +3 -3
- package/lib/rules/semi-spacing.js +3 -3
- package/lib/rules/semi-style.js +3 -3
- package/lib/rules/semi.js +3 -3
- package/lib/rules/space-before-blocks.js +3 -3
- package/lib/rules/space-before-function-paren.js +3 -3
- package/lib/rules/space-in-parens.js +3 -3
- package/lib/rules/space-infix-ops.js +3 -3
- package/lib/rules/space-unary-ops.js +3 -3
- package/lib/rules/spaced-comment.js +3 -3
- package/lib/rules/switch-colon-spacing.js +3 -3
- package/lib/rules/template-curly-spacing.js +3 -3
- package/lib/rules/template-tag-spacing.js +3 -3
- package/lib/rules/utils/ast-utils.js +45 -0
- package/lib/rules/wrap-iife.js +3 -3
- package/lib/rules/wrap-regex.js +3 -3
- package/lib/rules/yield-star-spacing.js +3 -3
- package/lib/services/suppressions-service.js +8 -0
- package/lib/shared/flags.js +9 -1
- package/lib/shared/naming.js +109 -0
- package/lib/shared/relative-module-resolver.js +28 -0
- package/lib/shared/runtime-info.js +1 -1
- package/lib/types/index.d.ts +15 -2
- package/lib/types/rules.d.ts +83 -74
- package/package.json +8 -8
- package/lib/linter/safe-emitter.js +0 -52
@@ -19,6 +19,7 @@ const vk = require("eslint-visitor-keys");
|
|
19
19
|
/**
|
20
20
|
* @import { ESQueryParsedSelector } from "./esquery.js";
|
21
21
|
* @import { Language, SourceCode } from "@eslint/core";
|
22
|
+
* @import { SourceCodeVisitor } from "./source-code-visitor.js";
|
22
23
|
*/
|
23
24
|
|
24
25
|
//-----------------------------------------------------------------------------
|
@@ -43,19 +44,17 @@ function compareSpecificity(a, b) {
|
|
43
44
|
*/
|
44
45
|
class ESQueryHelper {
|
45
46
|
/**
|
46
|
-
*
|
47
|
-
*
|
48
|
-
* have registered listeners for all of the events that it needs to listen for.
|
49
|
-
* (See lib/linter/safe-emitter.js for more details on `SafeEmitter`.)
|
47
|
+
* Creates a new instance.
|
48
|
+
* @param {SourceCodeVisitor} visitor The visitor containing the functions to call.
|
50
49
|
* @param {ESQueryOptions} esqueryOptions `esquery` options for traversing custom nodes.
|
51
50
|
* @returns {NodeEventGenerator} new instance
|
52
51
|
*/
|
53
|
-
constructor(
|
52
|
+
constructor(visitor, esqueryOptions) {
|
54
53
|
/**
|
55
54
|
* The emitter to use during traversal.
|
56
|
-
* @type {
|
55
|
+
* @type {SourceCodeVisitor}
|
57
56
|
*/
|
58
|
-
this.
|
57
|
+
this.visitor = visitor;
|
59
58
|
|
60
59
|
/**
|
61
60
|
* The options for `esquery` to use during matching.
|
@@ -91,7 +90,7 @@ class ESQueryHelper {
|
|
91
90
|
*/
|
92
91
|
this.anyTypeExitSelectors = [];
|
93
92
|
|
94
|
-
|
93
|
+
visitor.forEachName(rawSelector => {
|
95
94
|
const selector = parse(rawSelector);
|
96
95
|
|
97
96
|
/*
|
@@ -137,27 +136,26 @@ class ESQueryHelper {
|
|
137
136
|
}
|
138
137
|
|
139
138
|
/**
|
140
|
-
* Checks
|
139
|
+
* Checks if a node matches a given selector.
|
141
140
|
* @param {ASTNode} node The node to check
|
142
141
|
* @param {ASTNode[]} ancestry The ancestry of the node being checked.
|
143
142
|
* @param {ESQueryParsedSelector} selector An AST selector descriptor
|
144
|
-
* @returns {
|
143
|
+
* @returns {boolean} `true` if the selector matches the node, `false` otherwise
|
145
144
|
*/
|
146
|
-
|
147
|
-
|
148
|
-
this.emitter.emit(selector.source, node);
|
149
|
-
}
|
145
|
+
matches(node, ancestry, selector) {
|
146
|
+
return matches(node, selector.root, ancestry, this.esqueryOptions);
|
150
147
|
}
|
151
148
|
|
152
149
|
/**
|
153
|
-
*
|
150
|
+
* Calculates all appropriate selectors to a node, in specificity order
|
154
151
|
* @param {ASTNode} node The node to check
|
155
152
|
* @param {ASTNode[]} ancestry The ancestry of the node being checked.
|
156
153
|
* @param {boolean} isExit `false` if the node is currently being entered, `true` if it's currently being exited
|
157
|
-
* @returns {
|
154
|
+
* @returns {string[]} An array of selectors that match the node.
|
158
155
|
*/
|
159
|
-
|
156
|
+
calculateSelectors(node, ancestry, isExit) {
|
160
157
|
const nodeTypeKey = this.esqueryOptions?.nodeTypeKey || "type";
|
158
|
+
const selectors = [];
|
161
159
|
|
162
160
|
/*
|
163
161
|
* Get the selectors that may match this node. First, check
|
@@ -189,27 +187,36 @@ class ESQueryHelper {
|
|
189
187
|
* or if the next any type selector is more specific than the
|
190
188
|
* next selector for this node type, apply the any type selector.
|
191
189
|
*/
|
192
|
-
|
193
|
-
selectorsByNodeTypeIndex
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
190
|
+
const hasMoreNodeTypeSelectors =
|
191
|
+
selectorsByNodeTypeIndex < selectorsByNodeType.length;
|
192
|
+
const hasMoreAnyTypeSelectors =
|
193
|
+
anyTypeSelectorsIndex < anyTypeSelectors.length;
|
194
|
+
const anyTypeSelector = anyTypeSelectors[anyTypeSelectorsIndex];
|
195
|
+
const nodeTypeSelector =
|
196
|
+
selectorsByNodeType[selectorsByNodeTypeIndex];
|
197
|
+
|
198
|
+
// Only compare specificity if both selectors exist
|
199
|
+
const isAnyTypeSelectorLessSpecific =
|
200
|
+
hasMoreAnyTypeSelectors &&
|
201
|
+
hasMoreNodeTypeSelectors &&
|
202
|
+
anyTypeSelector.compare(nodeTypeSelector) < 0;
|
203
|
+
|
204
|
+
if (!hasMoreNodeTypeSelectors || isAnyTypeSelectorLessSpecific) {
|
205
|
+
anyTypeSelectorsIndex++;
|
206
|
+
|
207
|
+
if (this.matches(node, ancestry, anyTypeSelector)) {
|
208
|
+
selectors.push(anyTypeSelector.source);
|
209
|
+
}
|
204
210
|
} else {
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
);
|
211
|
+
selectorsByNodeTypeIndex++;
|
212
|
+
|
213
|
+
if (this.matches(node, ancestry, nodeTypeSelector)) {
|
214
|
+
selectors.push(nodeTypeSelector.source);
|
215
|
+
}
|
211
216
|
}
|
212
217
|
}
|
218
|
+
|
219
|
+
return selectors;
|
213
220
|
}
|
214
221
|
}
|
215
222
|
|
@@ -253,14 +260,14 @@ class SourceCodeTraverser {
|
|
253
260
|
/**
|
254
261
|
* Traverses the given source code synchronously.
|
255
262
|
* @param {SourceCode} sourceCode The source code to traverse.
|
256
|
-
* @param {
|
263
|
+
* @param {SourceCodeVisitor} visitor The emitter to use for events.
|
257
264
|
* @param {Object} options Options for traversal.
|
258
265
|
* @param {ReturnType<SourceCode["traverse"]>} options.steps The steps to take during traversal.
|
259
266
|
* @returns {void}
|
260
267
|
* @throws {Error} If an error occurs during traversal.
|
261
268
|
*/
|
262
|
-
traverseSync(sourceCode,
|
263
|
-
const esquery = new ESQueryHelper(
|
269
|
+
traverseSync(sourceCode, visitor, { steps } = {}) {
|
270
|
+
const esquery = new ESQueryHelper(visitor, {
|
264
271
|
visitorKeys: sourceCode.visitorKeys ?? this.#language.visitorKeys,
|
265
272
|
fallback: vk.getKeys,
|
266
273
|
matchClass: this.#language.matchesSelectorClass ?? (() => false),
|
@@ -274,19 +281,27 @@ class SourceCodeTraverser {
|
|
274
281
|
case STEP_KIND_VISIT: {
|
275
282
|
try {
|
276
283
|
if (step.phase === 1) {
|
277
|
-
esquery
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
284
|
+
esquery
|
285
|
+
.calculateSelectors(
|
286
|
+
step.target,
|
287
|
+
currentAncestry,
|
288
|
+
false,
|
289
|
+
)
|
290
|
+
.forEach(selector => {
|
291
|
+
visitor.callSync(selector, step.target);
|
292
|
+
});
|
282
293
|
currentAncestry.unshift(step.target);
|
283
294
|
} else {
|
284
295
|
currentAncestry.shift();
|
285
|
-
esquery
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
296
|
+
esquery
|
297
|
+
.calculateSelectors(
|
298
|
+
step.target,
|
299
|
+
currentAncestry,
|
300
|
+
true,
|
301
|
+
)
|
302
|
+
.forEach(selector => {
|
303
|
+
visitor.callSync(selector, step.target);
|
304
|
+
});
|
290
305
|
}
|
291
306
|
} catch (err) {
|
292
307
|
err.currentNode = step.target;
|
@@ -296,7 +311,7 @@ class SourceCodeTraverser {
|
|
296
311
|
}
|
297
312
|
|
298
313
|
case STEP_KIND_CALL: {
|
299
|
-
|
314
|
+
visitor.callSync(step.target, ...step.args);
|
300
315
|
break;
|
301
316
|
}
|
302
317
|
|
@@ -0,0 +1,81 @@
|
|
1
|
+
/**
|
2
|
+
* @fileoverview SourceCodeVisitor class
|
3
|
+
* @author Nicholas C. Zakas
|
4
|
+
*/
|
5
|
+
|
6
|
+
"use strict";
|
7
|
+
|
8
|
+
//-----------------------------------------------------------------------------
|
9
|
+
// Helpers
|
10
|
+
//-----------------------------------------------------------------------------
|
11
|
+
|
12
|
+
const emptyArray = Object.freeze([]);
|
13
|
+
|
14
|
+
//------------------------------------------------------------------------------
|
15
|
+
// Exports
|
16
|
+
//------------------------------------------------------------------------------
|
17
|
+
|
18
|
+
/**
|
19
|
+
* A structure to hold a list of functions to call for a given name.
|
20
|
+
* This is used to allow multiple rules to register functions for a given name
|
21
|
+
* without having to know about each other.
|
22
|
+
*/
|
23
|
+
class SourceCodeVisitor {
|
24
|
+
/**
|
25
|
+
* The functions to call for a given name.
|
26
|
+
* @type {Map<string, Function[]>}
|
27
|
+
*/
|
28
|
+
#functions = new Map();
|
29
|
+
|
30
|
+
/**
|
31
|
+
* Adds a function to the list of functions to call for a given name.
|
32
|
+
* @param {string} name The name of the function to call.
|
33
|
+
* @param {Function} func The function to call.
|
34
|
+
* @returns {void}
|
35
|
+
*/
|
36
|
+
add(name, func) {
|
37
|
+
if (this.#functions.has(name)) {
|
38
|
+
this.#functions.get(name).push(func);
|
39
|
+
} else {
|
40
|
+
this.#functions.set(name, [func]);
|
41
|
+
}
|
42
|
+
}
|
43
|
+
|
44
|
+
/**
|
45
|
+
* Gets the list of functions to call for a given name.
|
46
|
+
* @param {string} name The name of the function to call.
|
47
|
+
* @returns {Function[]} The list of functions to call.
|
48
|
+
*/
|
49
|
+
get(name) {
|
50
|
+
if (this.#functions.has(name)) {
|
51
|
+
return this.#functions.get(name);
|
52
|
+
}
|
53
|
+
|
54
|
+
return emptyArray;
|
55
|
+
}
|
56
|
+
|
57
|
+
/**
|
58
|
+
* Iterates over all names and calls the callback with the name.
|
59
|
+
* @param {(name:string) => void} callback The callback to call for each name.
|
60
|
+
* @returns {void}
|
61
|
+
*/
|
62
|
+
forEachName(callback) {
|
63
|
+
this.#functions.forEach((funcs, name) => {
|
64
|
+
callback(name);
|
65
|
+
});
|
66
|
+
}
|
67
|
+
|
68
|
+
/**
|
69
|
+
* Calls the functions for a given name with the given arguments.
|
70
|
+
* @param {string} name The name of the function to call.
|
71
|
+
* @param {any[]} args The arguments to pass to the function.
|
72
|
+
* @returns {void}
|
73
|
+
*/
|
74
|
+
callSync(name, ...args) {
|
75
|
+
if (this.#functions.has(name)) {
|
76
|
+
this.#functions.get(name).forEach(func => func(...args));
|
77
|
+
}
|
78
|
+
}
|
79
|
+
}
|
80
|
+
|
81
|
+
module.exports = { SourceCodeVisitor };
|
@@ -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
|
30
|
-
url: "https://eslint.style
|
29
|
+
name: "@stylistic/eslint-plugin",
|
30
|
+
url: "https://eslint.style",
|
31
31
|
},
|
32
32
|
rule: {
|
33
33
|
name: "array-bracket-newline",
|
34
|
-
url: "https://eslint.style/rules/
|
34
|
+
url: "https://eslint.style/rules/array-bracket-newline",
|
35
35
|
},
|
36
36
|
},
|
37
37
|
],
|
@@ -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
|
29
|
-
url: "https://eslint.style
|
28
|
+
name: "@stylistic/eslint-plugin",
|
29
|
+
url: "https://eslint.style",
|
30
30
|
},
|
31
31
|
rule: {
|
32
32
|
name: "array-bracket-spacing",
|
33
|
-
url: "https://eslint.style/rules/
|
33
|
+
url: "https://eslint.style/rules/array-bracket-spacing",
|
34
34
|
},
|
35
35
|
},
|
36
36
|
],
|
@@ -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
|
30
|
-
url: "https://eslint.style
|
29
|
+
name: "@stylistic/eslint-plugin",
|
30
|
+
url: "https://eslint.style",
|
31
31
|
},
|
32
32
|
rule: {
|
33
33
|
name: "array-element-newline",
|
34
|
-
url: "https://eslint.style/rules/
|
34
|
+
url: "https://eslint.style/rules/array-element-newline",
|
35
35
|
},
|
36
36
|
},
|
37
37
|
],
|
@@ -42,12 +42,12 @@ module.exports = {
|
|
42
42
|
"ESLint Stylistic now maintains deprecated stylistic core rules.",
|
43
43
|
url: "https://eslint.style/guide/migration",
|
44
44
|
plugin: {
|
45
|
-
name: "@stylistic/eslint-plugin
|
46
|
-
url: "https://eslint.style
|
45
|
+
name: "@stylistic/eslint-plugin",
|
46
|
+
url: "https://eslint.style",
|
47
47
|
},
|
48
48
|
rule: {
|
49
49
|
name: "arrow-parens",
|
50
|
-
url: "https://eslint.style/rules/
|
50
|
+
url: "https://eslint.style/rules/arrow-parens",
|
51
51
|
},
|
52
52
|
},
|
53
53
|
],
|
@@ -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
|
33
|
-
url: "https://eslint.style
|
32
|
+
name: "@stylistic/eslint-plugin",
|
33
|
+
url: "https://eslint.style",
|
34
34
|
},
|
35
35
|
rule: {
|
36
36
|
name: "arrow-spacing",
|
37
|
-
url: "https://eslint.style/rules/
|
37
|
+
url: "https://eslint.style/rules/arrow-spacing",
|
38
38
|
},
|
39
39
|
},
|
40
40
|
],
|
@@ -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
|
30
|
-
url: "https://eslint.style
|
29
|
+
name: "@stylistic/eslint-plugin",
|
30
|
+
url: "https://eslint.style",
|
31
31
|
},
|
32
32
|
rule: {
|
33
33
|
name: "block-spacing",
|
34
|
-
url: "https://eslint.style/rules/
|
34
|
+
url: "https://eslint.style/rules/block-spacing",
|
35
35
|
},
|
36
36
|
},
|
37
37
|
],
|
package/lib/rules/brace-style.js
CHANGED
@@ -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
|
30
|
-
url: "https://eslint.style
|
29
|
+
name: "@stylistic/eslint-plugin",
|
30
|
+
url: "https://eslint.style",
|
31
31
|
},
|
32
32
|
rule: {
|
33
33
|
name: "brace-style",
|
34
|
-
url: "https://eslint.style/rules/
|
34
|
+
url: "https://eslint.style/rules/brace-style",
|
35
35
|
},
|
36
36
|
},
|
37
37
|
],
|
@@ -111,6 +111,7 @@ module.exports = {
|
|
111
111
|
switch (node.type) {
|
112
112
|
case "MethodDefinition":
|
113
113
|
return !node.static && node.kind !== "constructor";
|
114
|
+
case "AccessorProperty":
|
114
115
|
case "PropertyDefinition":
|
115
116
|
return !node.static && enforceForClassFields;
|
116
117
|
default:
|
@@ -218,6 +219,8 @@ module.exports = {
|
|
218
219
|
/*
|
219
220
|
* Class field value are implicit functions.
|
220
221
|
*/
|
222
|
+
"AccessorProperty > *.key:exit": pushContext,
|
223
|
+
"AccessorProperty:exit": popContext,
|
221
224
|
"PropertyDefinition > *.key:exit": pushContext,
|
222
225
|
"PropertyDefinition:exit": popContext,
|
223
226
|
|
@@ -233,6 +236,10 @@ module.exports = {
|
|
233
236
|
ThisExpression: markThisUsed,
|
234
237
|
Super: markThisUsed,
|
235
238
|
...(enforceForClassFields && {
|
239
|
+
"AccessorProperty > ArrowFunctionExpression.value":
|
240
|
+
enterFunction,
|
241
|
+
"AccessorProperty > ArrowFunctionExpression.value:exit":
|
242
|
+
exitFunction,
|
236
243
|
"PropertyDefinition > ArrowFunctionExpression.value":
|
237
244
|
enterFunction,
|
238
245
|
"PropertyDefinition > ArrowFunctionExpression.value:exit":
|
@@ -85,12 +85,12 @@ module.exports = {
|
|
85
85
|
"ESLint Stylistic now maintains deprecated stylistic core rules.",
|
86
86
|
url: "https://eslint.style/guide/migration",
|
87
87
|
plugin: {
|
88
|
-
name: "@stylistic/eslint-plugin
|
89
|
-
url: "https://eslint.style
|
88
|
+
name: "@stylistic/eslint-plugin",
|
89
|
+
url: "https://eslint.style",
|
90
90
|
},
|
91
91
|
rule: {
|
92
92
|
name: "comma-dangle",
|
93
|
-
url: "https://eslint.style/rules/
|
93
|
+
url: "https://eslint.style/rules/comma-dangle",
|
94
94
|
},
|
95
95
|
},
|
96
96
|
],
|
@@ -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
|
29
|
-
url: "https://eslint.style
|
28
|
+
name: "@stylistic/eslint-plugin",
|
29
|
+
url: "https://eslint.style",
|
30
30
|
},
|
31
31
|
rule: {
|
32
32
|
name: "comma-spacing",
|
33
|
-
url: "https://eslint.style/rules/
|
33
|
+
url: "https://eslint.style/rules/comma-spacing",
|
34
34
|
},
|
35
35
|
},
|
36
36
|
],
|
package/lib/rules/comma-style.js
CHANGED
@@ -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
|
30
|
-
url: "https://eslint.style
|
29
|
+
name: "@stylistic/eslint-plugin",
|
30
|
+
url: "https://eslint.style",
|
31
31
|
},
|
32
32
|
rule: {
|
33
33
|
name: "comma-style",
|
34
|
-
url: "https://eslint.style/rules/
|
34
|
+
url: "https://eslint.style/rules/comma-style",
|
35
35
|
},
|
36
36
|
},
|
37
37
|
],
|
@@ -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
|
29
|
-
url: "https://eslint.style
|
28
|
+
name: "@stylistic/eslint-plugin",
|
29
|
+
url: "https://eslint.style",
|
30
30
|
},
|
31
31
|
rule: {
|
32
32
|
name: "computed-property-spacing",
|
33
|
-
url: "https://eslint.style/rules/
|
33
|
+
url: "https://eslint.style/rules/computed-property-spacing",
|
34
34
|
},
|
35
35
|
},
|
36
36
|
],
|
@@ -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
|
30
|
-
url: "https://eslint.style
|
29
|
+
name: "@stylistic/eslint-plugin",
|
30
|
+
url: "https://eslint.style",
|
31
31
|
},
|
32
32
|
rule: {
|
33
33
|
name: "dot-location",
|
34
|
-
url: "https://eslint.style/rules/
|
34
|
+
url: "https://eslint.style/rules/dot-location",
|
35
35
|
},
|
36
36
|
},
|
37
37
|
],
|
package/lib/rules/eol-last.js
CHANGED
@@ -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
|
27
|
-
url: "https://eslint.style
|
26
|
+
name: "@stylistic/eslint-plugin",
|
27
|
+
url: "https://eslint.style",
|
28
28
|
},
|
29
29
|
rule: {
|
30
30
|
name: "eol-last",
|
31
|
-
url: "https://eslint.style/rules/
|
31
|
+
url: "https://eslint.style/rules/eol-last",
|
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
|
34
|
-
url: "https://eslint.style
|
33
|
+
name: "@stylistic/eslint-plugin",
|
34
|
+
url: "https://eslint.style",
|
35
35
|
},
|
36
36
|
rule: {
|
37
37
|
name: "function-call-spacing",
|
38
|
-
url: "https://eslint.style/rules/
|
38
|
+
url: "https://eslint.style/rules/function-call-spacing",
|
39
39
|
},
|
40
40
|
},
|
41
41
|
],
|
@@ -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
|
28
|
-
url: "https://eslint.style
|
27
|
+
name: "@stylistic/eslint-plugin",
|
28
|
+
url: "https://eslint.style",
|
29
29
|
},
|
30
30
|
rule: {
|
31
31
|
name: "function-call-argument-newline",
|
32
|
-
url: "https://eslint.style/rules/
|
32
|
+
url: "https://eslint.style/rules/function-call-argument-newline",
|
33
33
|
},
|
34
34
|
},
|
35
35
|
],
|
@@ -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
|
33
|
-
url: "https://eslint.style
|
32
|
+
name: "@stylistic/eslint-plugin",
|
33
|
+
url: "https://eslint.style",
|
34
34
|
},
|
35
35
|
rule: {
|
36
36
|
name: "function-paren-newline",
|
37
|
-
url: "https://eslint.style/rules/
|
37
|
+
url: "https://eslint.style/rules/function-paren-newline",
|
38
38
|
},
|
39
39
|
},
|
40
40
|
],
|
@@ -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
|
44
|
-
url: "https://eslint.style
|
43
|
+
name: "@stylistic/eslint-plugin",
|
44
|
+
url: "https://eslint.style",
|
45
45
|
},
|
46
46
|
rule: {
|
47
47
|
name: "generator-star-spacing",
|
48
|
-
url: "https://eslint.style/rules/
|
48
|
+
url: "https://eslint.style/rules/generator-star-spacing",
|
49
49
|
},
|
50
50
|
},
|
51
51
|
],
|
@@ -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
|
28
|
-
url: "https://eslint.style
|
27
|
+
name: "@stylistic/eslint-plugin",
|
28
|
+
url: "https://eslint.style",
|
29
29
|
},
|
30
30
|
rule: {
|
31
31
|
name: "implicit-arrow-linebreak",
|
32
|
-
url: "https://eslint.style/rules/
|
32
|
+
url: "https://eslint.style/rules/implicit-arrow-linebreak",
|
33
33
|
},
|
34
34
|
},
|
35
35
|
],
|
@@ -41,12 +41,12 @@ module.exports = {
|
|
41
41
|
"ESLint Stylistic now maintains deprecated stylistic core rules.",
|
42
42
|
url: "https://eslint.style/guide/migration",
|
43
43
|
plugin: {
|
44
|
-
name: "@stylistic/eslint-plugin
|
45
|
-
url: "https://eslint.style
|
44
|
+
name: "@stylistic/eslint-plugin",
|
45
|
+
url: "https://eslint.style",
|
46
46
|
},
|
47
47
|
rule: {
|
48
48
|
name: "indent",
|
49
|
-
url: "https://eslint.style/rules/
|
49
|
+
url: "https://eslint.style/rules/indent",
|
50
50
|
},
|
51
51
|
},
|
52
52
|
],
|
package/lib/rules/indent.js
CHANGED
@@ -519,12 +519,12 @@ module.exports = {
|
|
519
519
|
"ESLint Stylistic now maintains deprecated stylistic core rules.",
|
520
520
|
url: "https://eslint.style/guide/migration",
|
521
521
|
plugin: {
|
522
|
-
name: "@stylistic/eslint-plugin
|
523
|
-
url: "https://eslint.style
|
522
|
+
name: "@stylistic/eslint-plugin",
|
523
|
+
url: "https://eslint.style",
|
524
524
|
},
|
525
525
|
rule: {
|
526
526
|
name: "indent",
|
527
|
-
url: "https://eslint.style/rules/
|
527
|
+
url: "https://eslint.style/rules/indent",
|
528
528
|
},
|
529
529
|
},
|
530
530
|
],
|