eslint 8.52.0 → 8.54.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/bin/eslint.js +24 -2
- package/lib/cli-engine/lint-result-cache.js +18 -6
- package/lib/linter/linter.js +2 -2
- package/lib/rules/array-bracket-newline.js +3 -0
- package/lib/rules/array-bracket-spacing.js +3 -0
- package/lib/rules/array-element-newline.js +3 -0
- package/lib/rules/arrow-parens.js +3 -0
- package/lib/rules/arrow-spacing.js +3 -0
- package/lib/rules/block-spacing.js +3 -0
- package/lib/rules/brace-style.js +3 -0
- package/lib/rules/comma-dangle.js +3 -0
- package/lib/rules/comma-spacing.js +3 -0
- package/lib/rules/comma-style.js +3 -0
- package/lib/rules/computed-property-spacing.js +3 -0
- package/lib/rules/dot-location.js +3 -0
- package/lib/rules/eol-last.js +3 -0
- package/lib/rules/for-direction.js +23 -16
- package/lib/rules/func-call-spacing.js +3 -0
- package/lib/rules/function-call-argument-newline.js +3 -0
- package/lib/rules/function-paren-newline.js +3 -0
- package/lib/rules/generator-star-spacing.js +3 -0
- package/lib/rules/implicit-arrow-linebreak.js +3 -0
- package/lib/rules/indent.js +3 -0
- package/lib/rules/jsx-quotes.js +3 -0
- package/lib/rules/key-spacing.js +3 -0
- package/lib/rules/keyword-spacing.js +3 -0
- package/lib/rules/linebreak-style.js +3 -0
- package/lib/rules/lines-around-comment.js +3 -0
- package/lib/rules/lines-between-class-members.js +3 -0
- package/lib/rules/max-len.js +3 -0
- package/lib/rules/max-statements-per-line.js +3 -0
- package/lib/rules/multiline-ternary.js +3 -0
- package/lib/rules/new-parens.js +3 -0
- package/lib/rules/newline-per-chained-call.js +3 -0
- package/lib/rules/no-array-constructor.js +85 -6
- package/lib/rules/no-confusing-arrow.js +3 -0
- package/lib/rules/no-console.js +74 -2
- package/lib/rules/no-extra-parens.js +3 -0
- package/lib/rules/no-extra-semi.js +3 -0
- package/lib/rules/no-floating-decimal.js +3 -0
- package/lib/rules/no-mixed-operators.js +3 -0
- package/lib/rules/no-mixed-spaces-and-tabs.js +3 -0
- package/lib/rules/no-multi-spaces.js +3 -0
- package/lib/rules/no-multiple-empty-lines.js +3 -0
- package/lib/rules/no-object-constructor.js +7 -106
- package/lib/rules/no-prototype-builtins.js +90 -2
- package/lib/rules/no-tabs.js +3 -0
- package/lib/rules/no-trailing-spaces.js +3 -0
- package/lib/rules/no-whitespace-before-property.js +3 -0
- package/lib/rules/nonblock-statement-body-position.js +3 -0
- package/lib/rules/object-curly-newline.js +3 -0
- package/lib/rules/object-curly-spacing.js +3 -0
- package/lib/rules/object-property-newline.js +3 -0
- package/lib/rules/one-var-declaration-per-line.js +3 -0
- package/lib/rules/operator-linebreak.js +3 -0
- package/lib/rules/padded-blocks.js +3 -0
- package/lib/rules/padding-line-between-statements.js +3 -0
- package/lib/rules/quote-props.js +3 -0
- package/lib/rules/quotes.js +3 -0
- package/lib/rules/rest-spread-spacing.js +3 -0
- package/lib/rules/semi-spacing.js +3 -0
- package/lib/rules/semi-style.js +3 -0
- package/lib/rules/semi.js +3 -0
- package/lib/rules/space-before-blocks.js +3 -0
- package/lib/rules/space-before-function-paren.js +3 -0
- package/lib/rules/space-in-parens.js +3 -0
- package/lib/rules/space-infix-ops.js +3 -0
- package/lib/rules/space-unary-ops.js +3 -0
- package/lib/rules/spaced-comment.js +3 -0
- package/lib/rules/switch-colon-spacing.js +3 -0
- package/lib/rules/template-curly-spacing.js +3 -0
- package/lib/rules/template-tag-spacing.js +3 -0
- package/lib/rules/utils/ast-utils.js +111 -1
- package/lib/rules/wrap-iife.js +3 -0
- package/lib/rules/wrap-regex.js +3 -0
- package/lib/rules/yield-star-spacing.js +3 -0
- package/package.json +8 -8
package/README.md
CHANGED
@@ -294,7 +294,7 @@ The following companies, organizations, and individuals support ESLint's ongoing
|
|
294
294
|
<p><a href="#"><img src="https://images.opencollective.com/2021-frameworks-fund/logo.png" alt="Chrome Frameworks Fund" height="undefined"></a> <a href="https://automattic.com"><img src="https://images.opencollective.com/automattic/d0ef3e1/logo.png" alt="Automattic" height="undefined"></a></p><h3>Gold Sponsors</h3>
|
295
295
|
<p><a href="https://engineering.salesforce.com"><img src="https://images.opencollective.com/salesforce/ca8f997/logo.png" alt="Salesforce" height="96"></a> <a href="https://www.airbnb.com/"><img src="https://images.opencollective.com/airbnb/d327d66/logo.png" alt="Airbnb" height="96"></a></p><h3>Silver Sponsors</h3>
|
296
296
|
<p><a href="https://liftoff.io/"><img src="https://images.opencollective.com/liftoff/5c4fa84/logo.png" alt="Liftoff" height="64"></a> <a href="https://americanexpress.io"><img src="https://avatars.githubusercontent.com/u/3853301?v=4" alt="American Express" height="64"></a></p><h3>Bronze Sponsors</h3>
|
297
|
-
<p><a href="https://themeisle.com"><img src="https://images.opencollective.com/themeisle/d5592fe/logo.png" alt="ThemeIsle" height="32"></a> <a href="https://www.crosswordsolver.org/anagram-solver/"><img src="https://images.opencollective.com/anagram-solver/2666271/logo.png" alt="Anagram Solver" height="32"></a> <a href="https://icons8.com/"><img src="https://images.opencollective.com/icons8/7fa1641/logo.png" alt="Icons8" height="32"></a> <a href="https://discord.com"><img src="https://images.opencollective.com/discordapp/f9645d9/logo.png" alt="Discord" height="32"></a> <a href="https://transloadit.com/"><img src="https://avatars.githubusercontent.com/u/125754?v=4" alt="Transloadit" height="32"></a> <a href="https://www.ignitionapp.com"><img src="https://avatars.githubusercontent.com/u/5753491?v=4" alt="Ignition" height="32"></a> <a href="https://herocoders.com"><img src="https://avatars.githubusercontent.com/u/37549774?v=4" alt="HeroCoders" height="32"></a
|
297
|
+
<p><a href="https://themeisle.com"><img src="https://images.opencollective.com/themeisle/d5592fe/logo.png" alt="ThemeIsle" height="32"></a> <a href="https://www.crosswordsolver.org/anagram-solver/"><img src="https://images.opencollective.com/anagram-solver/2666271/logo.png" alt="Anagram Solver" height="32"></a> <a href="https://icons8.com/"><img src="https://images.opencollective.com/icons8/7fa1641/logo.png" alt="Icons8" height="32"></a> <a href="https://discord.com"><img src="https://images.opencollective.com/discordapp/f9645d9/logo.png" alt="Discord" height="32"></a> <a href="https://transloadit.com/"><img src="https://avatars.githubusercontent.com/u/125754?v=4" alt="Transloadit" height="32"></a> <a href="https://www.ignitionapp.com"><img src="https://avatars.githubusercontent.com/u/5753491?v=4" alt="Ignition" height="32"></a> <a href="https://herocoders.com"><img src="https://avatars.githubusercontent.com/u/37549774?v=4" alt="HeroCoders" height="32"></a></p>
|
298
298
|
<!--sponsorsend-->
|
299
299
|
|
300
300
|
## Technology Sponsors
|
package/bin/eslint.js
CHANGED
@@ -97,9 +97,14 @@ function getErrorMessage(error) {
|
|
97
97
|
* same message once.
|
98
98
|
* @type {Set<string>}
|
99
99
|
*/
|
100
|
-
|
101
100
|
const displayedErrors = new Set();
|
102
101
|
|
102
|
+
/**
|
103
|
+
* Tracks whether an unexpected error was caught
|
104
|
+
* @type {boolean}
|
105
|
+
*/
|
106
|
+
let hadFatalError = false;
|
107
|
+
|
103
108
|
/**
|
104
109
|
* Catch and report unexpected error.
|
105
110
|
* @param {any} error The thrown error object.
|
@@ -107,6 +112,7 @@ const displayedErrors = new Set();
|
|
107
112
|
*/
|
108
113
|
function onFatalError(error) {
|
109
114
|
process.exitCode = 2;
|
115
|
+
hadFatalError = true;
|
110
116
|
|
111
117
|
const { version } = require("../package.json");
|
112
118
|
const message = `
|
@@ -143,9 +149,25 @@ ${getErrorMessage(error)}`;
|
|
143
149
|
}
|
144
150
|
|
145
151
|
// Otherwise, call the CLI.
|
146
|
-
|
152
|
+
const exitCode = await require("../lib/cli").execute(
|
147
153
|
process.argv,
|
148
154
|
process.argv.includes("--stdin") ? await readStdin() : null,
|
149
155
|
true
|
150
156
|
);
|
157
|
+
|
158
|
+
/*
|
159
|
+
* If an uncaught exception or unhandled rejection was detected in the meantime,
|
160
|
+
* keep the fatal exit code 2 that is already assigned to `process.exitCode`.
|
161
|
+
* Without this condition, exit code 2 (unsuccessful execution) could be overwritten with
|
162
|
+
* 1 (successful execution, lint problems found) or even 0 (successful execution, no lint problems found).
|
163
|
+
* This ensures that unexpected errors that seemingly don't affect the success
|
164
|
+
* of the execution will still cause a non-zero exit code, as it's a common
|
165
|
+
* practice and the default behavior of Node.js to exit with non-zero
|
166
|
+
* in case of an uncaught exception or unhandled rejection.
|
167
|
+
*
|
168
|
+
* Otherwise, assign the exit code returned from CLI.
|
169
|
+
*/
|
170
|
+
if (!hadFatalError) {
|
171
|
+
process.exitCode = exitCode;
|
172
|
+
}
|
151
173
|
}()).catch(onFatalError);
|
@@ -128,16 +128,28 @@ class LintResultCache {
|
|
128
128
|
return null;
|
129
129
|
}
|
130
130
|
|
131
|
+
const cachedResults = fileDescriptor.meta.results;
|
132
|
+
|
133
|
+
// Just in case, not sure if this can ever happen.
|
134
|
+
if (!cachedResults) {
|
135
|
+
return cachedResults;
|
136
|
+
}
|
137
|
+
|
138
|
+
/*
|
139
|
+
* Shallow clone the object to ensure that any properties added or modified afterwards
|
140
|
+
* will not be accidentally stored in the cache file when `reconcile()` is called.
|
141
|
+
* https://github.com/eslint/eslint/issues/13507
|
142
|
+
* All intentional changes to the cache file must be done through `setCachedLintResults()`.
|
143
|
+
*/
|
144
|
+
const results = { ...cachedResults };
|
145
|
+
|
131
146
|
// If source is present but null, need to reread the file from the filesystem.
|
132
|
-
if (
|
133
|
-
fileDescriptor.meta.results &&
|
134
|
-
fileDescriptor.meta.results.source === null
|
135
|
-
) {
|
147
|
+
if (results.source === null) {
|
136
148
|
debug(`Rereading cached result source from filesystem: ${filePath}`);
|
137
|
-
|
149
|
+
results.source = fs.readFileSync(filePath, "utf-8");
|
138
150
|
}
|
139
151
|
|
140
|
-
return
|
152
|
+
return results;
|
141
153
|
}
|
142
154
|
|
143
155
|
/**
|
package/lib/linter/linter.js
CHANGED
@@ -1422,7 +1422,7 @@ class Linter {
|
|
1422
1422
|
verify(textOrSourceCode, config, filenameOrOptions) {
|
1423
1423
|
debug("Verify");
|
1424
1424
|
|
1425
|
-
const { configType } = internalSlotsMap.get(this);
|
1425
|
+
const { configType, cwd } = internalSlotsMap.get(this);
|
1426
1426
|
|
1427
1427
|
const options = typeof filenameOrOptions === "string"
|
1428
1428
|
? { filename: filenameOrOptions }
|
@@ -1441,7 +1441,7 @@ class Linter {
|
|
1441
1441
|
let configArray = config;
|
1442
1442
|
|
1443
1443
|
if (!Array.isArray(config) || typeof config.getConfig !== "function") {
|
1444
|
-
configArray = new FlatConfigArray(config);
|
1444
|
+
configArray = new FlatConfigArray(config, { basePath: cwd });
|
1445
1445
|
configArray.normalizeSync();
|
1446
1446
|
}
|
1447
1447
|
|
@@ -1,6 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* @fileoverview Rule to enforce linebreaks after open and before close array brackets
|
3
3
|
* @author Jan Peer Stöcklmair <https://github.com/JPeer264>
|
4
|
+
* @deprecated in ESLint v8.53.0
|
4
5
|
*/
|
5
6
|
|
6
7
|
"use strict";
|
@@ -14,6 +15,8 @@ const astUtils = require("./utils/ast-utils");
|
|
14
15
|
/** @type {import('../shared/types').Rule} */
|
15
16
|
module.exports = {
|
16
17
|
meta: {
|
18
|
+
deprecated: true,
|
19
|
+
replacedBy: [],
|
17
20
|
type: "layout",
|
18
21
|
|
19
22
|
docs: {
|
@@ -1,6 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* @fileoverview Disallows or enforces spaces inside of array brackets.
|
3
3
|
* @author Jamund Ferguson
|
4
|
+
* @deprecated in ESLint v8.53.0
|
4
5
|
*/
|
5
6
|
"use strict";
|
6
7
|
|
@@ -13,6 +14,8 @@ const astUtils = require("./utils/ast-utils");
|
|
13
14
|
/** @type {import('../shared/types').Rule} */
|
14
15
|
module.exports = {
|
15
16
|
meta: {
|
17
|
+
deprecated: true,
|
18
|
+
replacedBy: [],
|
16
19
|
type: "layout",
|
17
20
|
|
18
21
|
docs: {
|
@@ -1,6 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* @fileoverview Rule to enforce line breaks after each array element
|
3
3
|
* @author Jan Peer Stöcklmair <https://github.com/JPeer264>
|
4
|
+
* @deprecated in ESLint v8.53.0
|
4
5
|
*/
|
5
6
|
|
6
7
|
"use strict";
|
@@ -14,6 +15,8 @@ const astUtils = require("./utils/ast-utils");
|
|
14
15
|
/** @type {import('../shared/types').Rule} */
|
15
16
|
module.exports = {
|
16
17
|
meta: {
|
18
|
+
deprecated: true,
|
19
|
+
replacedBy: [],
|
17
20
|
type: "layout",
|
18
21
|
|
19
22
|
docs: {
|
@@ -1,6 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* @fileoverview Rule to require parens in arrow function arguments.
|
3
3
|
* @author Jxck
|
4
|
+
* @deprecated in ESLint v8.53.0
|
4
5
|
*/
|
5
6
|
"use strict";
|
6
7
|
|
@@ -30,6 +31,8 @@ function hasBlockBody(node) {
|
|
30
31
|
/** @type {import('../shared/types').Rule} */
|
31
32
|
module.exports = {
|
32
33
|
meta: {
|
34
|
+
deprecated: true,
|
35
|
+
replacedBy: [],
|
33
36
|
type: "layout",
|
34
37
|
|
35
38
|
docs: {
|
@@ -1,6 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* @fileoverview Rule to define spacing before/after arrow function's arrow.
|
3
3
|
* @author Jxck
|
4
|
+
* @deprecated in ESLint v8.53.0
|
4
5
|
*/
|
5
6
|
"use strict";
|
6
7
|
|
@@ -17,6 +18,8 @@ const astUtils = require("./utils/ast-utils");
|
|
17
18
|
/** @type {import('../shared/types').Rule} */
|
18
19
|
module.exports = {
|
19
20
|
meta: {
|
21
|
+
deprecated: true,
|
22
|
+
replacedBy: [],
|
20
23
|
type: "layout",
|
21
24
|
|
22
25
|
docs: {
|
@@ -1,6 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* @fileoverview A rule to disallow or enforce spaces inside of single line blocks.
|
3
3
|
* @author Toru Nagashima
|
4
|
+
* @deprecated in ESLint v8.53.0
|
4
5
|
*/
|
5
6
|
|
6
7
|
"use strict";
|
@@ -14,6 +15,8 @@ const util = require("./utils/ast-utils");
|
|
14
15
|
/** @type {import('../shared/types').Rule} */
|
15
16
|
module.exports = {
|
16
17
|
meta: {
|
18
|
+
deprecated: true,
|
19
|
+
replacedBy: [],
|
17
20
|
type: "layout",
|
18
21
|
|
19
22
|
docs: {
|
package/lib/rules/brace-style.js
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* @fileoverview Rule to flag block statements that do not use the one true brace style
|
3
3
|
* @author Ian Christian Myers
|
4
|
+
* @deprecated in ESLint v8.53.0
|
4
5
|
*/
|
5
6
|
|
6
7
|
"use strict";
|
@@ -14,6 +15,8 @@ const astUtils = require("./utils/ast-utils");
|
|
14
15
|
/** @type {import('../shared/types').Rule} */
|
15
16
|
module.exports = {
|
16
17
|
meta: {
|
18
|
+
deprecated: true,
|
19
|
+
replacedBy: [],
|
17
20
|
type: "layout",
|
18
21
|
|
19
22
|
docs: {
|
@@ -1,6 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* @fileoverview Rule to forbid or enforce dangling commas.
|
3
3
|
* @author Ian Christian Myers
|
4
|
+
* @deprecated in ESLint v8.53.0
|
4
5
|
*/
|
5
6
|
|
6
7
|
"use strict";
|
@@ -73,6 +74,8 @@ function normalizeOptions(optionValue, ecmaVersion) {
|
|
73
74
|
/** @type {import('../shared/types').Rule} */
|
74
75
|
module.exports = {
|
75
76
|
meta: {
|
77
|
+
deprecated: true,
|
78
|
+
replacedBy: [],
|
76
79
|
type: "layout",
|
77
80
|
|
78
81
|
docs: {
|
@@ -1,6 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* @fileoverview Comma spacing - validates spacing before and after comma
|
3
3
|
* @author Vignesh Anand aka vegetableman.
|
4
|
+
* @deprecated in ESLint v8.53.0
|
4
5
|
*/
|
5
6
|
"use strict";
|
6
7
|
|
@@ -13,6 +14,8 @@ const astUtils = require("./utils/ast-utils");
|
|
13
14
|
/** @type {import('../shared/types').Rule} */
|
14
15
|
module.exports = {
|
15
16
|
meta: {
|
17
|
+
deprecated: true,
|
18
|
+
replacedBy: [],
|
16
19
|
type: "layout",
|
17
20
|
|
18
21
|
docs: {
|
package/lib/rules/comma-style.js
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* @fileoverview Comma style - enforces comma styles of two types: last and first
|
3
3
|
* @author Vignesh Anand aka vegetableman
|
4
|
+
* @deprecated in ESLint v8.53.0
|
4
5
|
*/
|
5
6
|
|
6
7
|
"use strict";
|
@@ -14,6 +15,8 @@ const astUtils = require("./utils/ast-utils");
|
|
14
15
|
/** @type {import('../shared/types').Rule} */
|
15
16
|
module.exports = {
|
16
17
|
meta: {
|
18
|
+
deprecated: true,
|
19
|
+
replacedBy: [],
|
17
20
|
type: "layout",
|
18
21
|
|
19
22
|
docs: {
|
@@ -1,6 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* @fileoverview Disallows or enforces spaces inside computed properties.
|
3
3
|
* @author Jamund Ferguson
|
4
|
+
* @deprecated in ESLint v8.53.0
|
4
5
|
*/
|
5
6
|
"use strict";
|
6
7
|
|
@@ -13,6 +14,8 @@ const astUtils = require("./utils/ast-utils");
|
|
13
14
|
/** @type {import('../shared/types').Rule} */
|
14
15
|
module.exports = {
|
15
16
|
meta: {
|
17
|
+
deprecated: true,
|
18
|
+
replacedBy: [],
|
16
19
|
type: "layout",
|
17
20
|
|
18
21
|
docs: {
|
@@ -1,6 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* @fileoverview Validates newlines before and after dots
|
3
3
|
* @author Greg Cochard
|
4
|
+
* @deprecated in ESLint v8.53.0
|
4
5
|
*/
|
5
6
|
|
6
7
|
"use strict";
|
@@ -14,6 +15,8 @@ const astUtils = require("./utils/ast-utils");
|
|
14
15
|
/** @type {import('../shared/types').Rule} */
|
15
16
|
module.exports = {
|
16
17
|
meta: {
|
18
|
+
deprecated: true,
|
19
|
+
replacedBy: [],
|
17
20
|
type: "layout",
|
18
21
|
|
19
22
|
docs: {
|
package/lib/rules/eol-last.js
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* @fileoverview Require or disallow newline at the end of files
|
3
3
|
* @author Nodeca Team <https://github.com/nodeca>
|
4
|
+
* @deprecated in ESLint v8.53.0
|
4
5
|
*/
|
5
6
|
"use strict";
|
6
7
|
|
@@ -11,6 +12,8 @@
|
|
11
12
|
/** @type {import('../shared/types').Rule} */
|
12
13
|
module.exports = {
|
13
14
|
meta: {
|
15
|
+
deprecated: true,
|
16
|
+
replacedBy: [],
|
14
17
|
type: "layout",
|
15
18
|
|
16
19
|
docs: {
|
@@ -101,30 +101,37 @@ module.exports = {
|
|
101
101
|
}
|
102
102
|
return 0;
|
103
103
|
}
|
104
|
+
|
104
105
|
return {
|
105
106
|
ForStatement(node) {
|
106
107
|
|
107
|
-
if (node.test && node.test.type === "BinaryExpression" && node.
|
108
|
-
const
|
109
|
-
|
110
|
-
|
108
|
+
if (node.test && node.test.type === "BinaryExpression" && node.update) {
|
109
|
+
for (const counterPosition of ["left", "right"]) {
|
110
|
+
if (node.test[counterPosition].type !== "Identifier") {
|
111
|
+
continue;
|
112
|
+
}
|
111
113
|
|
112
|
-
|
114
|
+
const counter = node.test[counterPosition].name;
|
115
|
+
const operator = node.test.operator;
|
116
|
+
const update = node.update;
|
113
117
|
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
118
|
+
let wrongDirection;
|
119
|
+
|
120
|
+
if (operator === "<" || operator === "<=") {
|
121
|
+
wrongDirection = counterPosition === "left" ? -1 : 1;
|
122
|
+
} else if (operator === ">" || operator === ">=") {
|
123
|
+
wrongDirection = counterPosition === "left" ? 1 : -1;
|
124
|
+
} else {
|
125
|
+
return;
|
126
|
+
}
|
121
127
|
|
122
|
-
|
123
|
-
|
128
|
+
if (update.type === "UpdateExpression") {
|
129
|
+
if (getUpdateDirection(update, counter) === wrongDirection) {
|
130
|
+
report(node);
|
131
|
+
}
|
132
|
+
} else if (update.type === "AssignmentExpression" && getAssignmentDirection(update, counter) === wrongDirection) {
|
124
133
|
report(node);
|
125
134
|
}
|
126
|
-
} else if (update.type === "AssignmentExpression" && getAssignmentDirection(update, counter) === wrongDirection) {
|
127
|
-
report(node);
|
128
135
|
}
|
129
136
|
}
|
130
137
|
}
|
@@ -1,6 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* @fileoverview Rule to control spacing within function calls
|
3
3
|
* @author Matt DuVall <http://www.mattduvall.com>
|
4
|
+
* @deprecated in ESLint v8.53.0
|
4
5
|
*/
|
5
6
|
|
6
7
|
"use strict";
|
@@ -18,6 +19,8 @@ const astUtils = require("./utils/ast-utils");
|
|
18
19
|
/** @type {import('../shared/types').Rule} */
|
19
20
|
module.exports = {
|
20
21
|
meta: {
|
22
|
+
deprecated: true,
|
23
|
+
replacedBy: [],
|
21
24
|
type: "layout",
|
22
25
|
|
23
26
|
docs: {
|
@@ -1,6 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* @fileoverview Rule to enforce line breaks between arguments of a function call
|
3
3
|
* @author Alexey Gonchar <https://github.com/finico>
|
4
|
+
* @deprecated in ESLint v8.53.0
|
4
5
|
*/
|
5
6
|
|
6
7
|
"use strict";
|
@@ -12,6 +13,8 @@
|
|
12
13
|
/** @type {import('../shared/types').Rule} */
|
13
14
|
module.exports = {
|
14
15
|
meta: {
|
16
|
+
deprecated: true,
|
17
|
+
replacedBy: [],
|
15
18
|
type: "layout",
|
16
19
|
|
17
20
|
docs: {
|
@@ -1,6 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* @fileoverview enforce consistent line breaks inside function parentheses
|
3
3
|
* @author Teddy Katz
|
4
|
+
* @deprecated in ESLint v8.53.0
|
4
5
|
*/
|
5
6
|
"use strict";
|
6
7
|
|
@@ -17,6 +18,8 @@ const astUtils = require("./utils/ast-utils");
|
|
17
18
|
/** @type {import('../shared/types').Rule} */
|
18
19
|
module.exports = {
|
19
20
|
meta: {
|
21
|
+
deprecated: true,
|
22
|
+
replacedBy: [],
|
20
23
|
type: "layout",
|
21
24
|
|
22
25
|
docs: {
|
@@ -1,6 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* @fileoverview Rule to check the spacing around the * in generator functions.
|
3
3
|
* @author Jamund Ferguson
|
4
|
+
* @deprecated in ESLint v8.53.0
|
4
5
|
*/
|
5
6
|
|
6
7
|
"use strict";
|
@@ -28,6 +29,8 @@ const OVERRIDE_SCHEMA = {
|
|
28
29
|
/** @type {import('../shared/types').Rule} */
|
29
30
|
module.exports = {
|
30
31
|
meta: {
|
32
|
+
deprecated: true,
|
33
|
+
replacedBy: [],
|
31
34
|
type: "layout",
|
32
35
|
|
33
36
|
docs: {
|
@@ -1,6 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* @fileoverview enforce the location of arrow function bodies
|
3
3
|
* @author Sharmila Jesupaul
|
4
|
+
* @deprecated in ESLint v8.53.0
|
4
5
|
*/
|
5
6
|
"use strict";
|
6
7
|
|
@@ -12,6 +13,8 @@ const { isCommentToken, isNotOpeningParenToken } = require("./utils/ast-utils");
|
|
12
13
|
/** @type {import('../shared/types').Rule} */
|
13
14
|
module.exports = {
|
14
15
|
meta: {
|
16
|
+
deprecated: true,
|
17
|
+
replacedBy: [],
|
15
18
|
type: "layout",
|
16
19
|
|
17
20
|
docs: {
|
package/lib/rules/indent.js
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
* @author Teddy Katz
|
5
5
|
* @author Vitaly Puzrin
|
6
6
|
* @author Gyandeep Singh
|
7
|
+
* @deprecated in ESLint v8.53.0
|
7
8
|
*/
|
8
9
|
|
9
10
|
"use strict";
|
@@ -493,6 +494,8 @@ const ELEMENT_LIST_SCHEMA = {
|
|
493
494
|
/** @type {import('../shared/types').Rule} */
|
494
495
|
module.exports = {
|
495
496
|
meta: {
|
497
|
+
deprecated: true,
|
498
|
+
replacedBy: [],
|
496
499
|
type: "layout",
|
497
500
|
|
498
501
|
docs: {
|
package/lib/rules/jsx-quotes.js
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* @fileoverview A rule to ensure consistent quotes used in jsx syntax.
|
3
3
|
* @author Mathias Schreck <https://github.com/lo1tuma>
|
4
|
+
* @deprecated in ESLint v8.53.0
|
4
5
|
*/
|
5
6
|
|
6
7
|
"use strict";
|
@@ -39,6 +40,8 @@ const QUOTE_SETTINGS = {
|
|
39
40
|
/** @type {import('../shared/types').Rule} */
|
40
41
|
module.exports = {
|
41
42
|
meta: {
|
43
|
+
deprecated: true,
|
44
|
+
replacedBy: [],
|
42
45
|
type: "layout",
|
43
46
|
|
44
47
|
docs: {
|
package/lib/rules/key-spacing.js
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* @fileoverview Rule to specify spacing of object literal keys and values
|
3
3
|
* @author Brandon Mills
|
4
|
+
* @deprecated in ESLint v8.53.0
|
4
5
|
*/
|
5
6
|
"use strict";
|
6
7
|
|
@@ -133,6 +134,8 @@ function initOptions(toOptions, fromOptions) {
|
|
133
134
|
/** @type {import('../shared/types').Rule} */
|
134
135
|
module.exports = {
|
135
136
|
meta: {
|
137
|
+
deprecated: true,
|
138
|
+
replacedBy: [],
|
136
139
|
type: "layout",
|
137
140
|
|
138
141
|
docs: {
|
@@ -1,6 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* @fileoverview Rule to enforce spacing before and after keywords.
|
3
3
|
* @author Toru Nagashima
|
4
|
+
* @deprecated in ESLint v8.53.0
|
4
5
|
*/
|
5
6
|
|
6
7
|
"use strict";
|
@@ -64,6 +65,8 @@ function isCloseParenOfTemplate(token) {
|
|
64
65
|
/** @type {import('../shared/types').Rule} */
|
65
66
|
module.exports = {
|
66
67
|
meta: {
|
68
|
+
deprecated: true,
|
69
|
+
replacedBy: [],
|
67
70
|
type: "layout",
|
68
71
|
|
69
72
|
docs: {
|
@@ -1,6 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* @fileoverview Rule to enforce a single linebreak style.
|
3
3
|
* @author Erik Mueller
|
4
|
+
* @deprecated in ESLint v8.53.0
|
4
5
|
*/
|
5
6
|
|
6
7
|
"use strict";
|
@@ -18,6 +19,8 @@ const astUtils = require("./utils/ast-utils");
|
|
18
19
|
/** @type {import('../shared/types').Rule} */
|
19
20
|
module.exports = {
|
20
21
|
meta: {
|
22
|
+
deprecated: true,
|
23
|
+
replacedBy: [],
|
21
24
|
type: "layout",
|
22
25
|
|
23
26
|
docs: {
|
@@ -1,6 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* @fileoverview Enforces empty lines around comments.
|
3
3
|
* @author Jamund Ferguson
|
4
|
+
* @deprecated in ESLint v8.53.0
|
4
5
|
*/
|
5
6
|
"use strict";
|
6
7
|
|
@@ -52,6 +53,8 @@ function getCommentLineNums(comments) {
|
|
52
53
|
/** @type {import('../shared/types').Rule} */
|
53
54
|
module.exports = {
|
54
55
|
meta: {
|
56
|
+
deprecated: true,
|
57
|
+
replacedBy: [],
|
55
58
|
type: "layout",
|
56
59
|
|
57
60
|
docs: {
|
@@ -1,6 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* @fileoverview Rule to check empty newline between class members
|
3
3
|
* @author 薛定谔的猫<hh_2013@foxmail.com>
|
4
|
+
* @deprecated in ESLint v8.53.0
|
4
5
|
*/
|
5
6
|
"use strict";
|
6
7
|
|
@@ -32,6 +33,8 @@ const ClassMemberTypes = {
|
|
32
33
|
/** @type {import('../shared/types').Rule} */
|
33
34
|
module.exports = {
|
34
35
|
meta: {
|
36
|
+
deprecated: true,
|
37
|
+
replacedBy: [],
|
35
38
|
type: "layout",
|
36
39
|
|
37
40
|
docs: {
|
package/lib/rules/max-len.js
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* @fileoverview Rule to check for max length on a line.
|
3
3
|
* @author Matt DuVall <http://www.mattduvall.com>
|
4
|
+
* @deprecated in ESLint v8.53.0
|
4
5
|
*/
|
5
6
|
|
6
7
|
"use strict";
|
@@ -66,6 +67,8 @@ const OPTIONS_OR_INTEGER_SCHEMA = {
|
|
66
67
|
/** @type {import('../shared/types').Rule} */
|
67
68
|
module.exports = {
|
68
69
|
meta: {
|
70
|
+
deprecated: true,
|
71
|
+
replacedBy: [],
|
69
72
|
type: "layout",
|
70
73
|
|
71
74
|
docs: {
|
@@ -1,6 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* @fileoverview Specify the maximum number of statements allowed per line.
|
3
3
|
* @author Kenneth Williams
|
4
|
+
* @deprecated in ESLint v8.53.0
|
4
5
|
*/
|
5
6
|
"use strict";
|
6
7
|
|
@@ -17,6 +18,8 @@ const astUtils = require("./utils/ast-utils");
|
|
17
18
|
/** @type {import('../shared/types').Rule} */
|
18
19
|
module.exports = {
|
19
20
|
meta: {
|
21
|
+
deprecated: true,
|
22
|
+
replacedBy: [],
|
20
23
|
type: "layout",
|
21
24
|
|
22
25
|
docs: {
|
@@ -1,6 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* @fileoverview Enforce newlines between operands of ternary expressions
|
3
3
|
* @author Kai Cataldo
|
4
|
+
* @deprecated in ESLint v8.53.0
|
4
5
|
*/
|
5
6
|
|
6
7
|
"use strict";
|
@@ -14,6 +15,8 @@ const astUtils = require("./utils/ast-utils");
|
|
14
15
|
/** @type {import('../shared/types').Rule} */
|
15
16
|
module.exports = {
|
16
17
|
meta: {
|
18
|
+
deprecated: true,
|
19
|
+
replacedBy: [],
|
17
20
|
type: "layout",
|
18
21
|
|
19
22
|
docs: {
|