eslint 9.37.0 → 9.39.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 +12 -2
- package/lib/eslint/eslint-helpers.js +1 -1
- package/lib/eslint/eslint.js +17 -1
- package/lib/eslint/worker.js +12 -1
- package/lib/linter/file-report.js +1 -1
- package/lib/linter/source-code-traverser.js +11 -5
- package/lib/linter/timing.js +38 -1
- package/lib/rules/callback-return.js +1 -1
- package/lib/rules/complexity.js +5 -0
- package/lib/rules/for-direction.js +4 -1
- package/lib/rules/global-require.js +1 -1
- package/lib/rules/handle-callback-err.js +1 -1
- package/lib/rules/id-blacklist.js +1 -1
- package/lib/rules/no-buffer-constructor.js +1 -1
- package/lib/rules/no-catch-shadow.js +1 -1
- package/lib/rules/no-dupe-args.js +12 -1
- package/lib/rules/no-dupe-class-members.js +1 -1
- package/lib/rules/no-loss-of-precision.js +206 -208
- package/lib/rules/no-mixed-requires.js +1 -1
- package/lib/rules/no-native-reassign.js +1 -1
- package/lib/rules/no-negated-in-lhs.js +1 -1
- package/lib/rules/no-new-object.js +1 -1
- package/lib/rules/no-new-require.js +1 -1
- package/lib/rules/no-new-symbol.js +1 -1
- package/lib/rules/no-path-concat.js +1 -1
- package/lib/rules/no-process-env.js +1 -1
- package/lib/rules/no-process-exit.js +1 -1
- package/lib/rules/no-restricted-modules.js +1 -1
- package/lib/rules/no-sync.js +1 -1
- package/lib/rules/object-shorthand.js +105 -80
- package/lib/rules/utils/ast-utils.js +1 -0
- package/lib/shared/serialization.js +1 -1
- package/lib/types/config-api.d.ts +6 -2
- package/lib/types/index.d.ts +169 -995
- package/package.json +11 -10
|
@@ -5,6 +5,212 @@
|
|
|
5
5
|
|
|
6
6
|
"use strict";
|
|
7
7
|
|
|
8
|
+
//------------------------------------------------------------------------------
|
|
9
|
+
// Helpers
|
|
10
|
+
//------------------------------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
/** Class representing a number in scientific notation. */
|
|
13
|
+
class ScientificNotation {
|
|
14
|
+
/** @type {string} The digits of the coefficient. A decimal point is implied after the first digit. */
|
|
15
|
+
coefficient;
|
|
16
|
+
|
|
17
|
+
/** @type {number} The order of magnitude. */
|
|
18
|
+
magnitude;
|
|
19
|
+
|
|
20
|
+
constructor(coefficient, magnitude) {
|
|
21
|
+
this.coefficient = coefficient;
|
|
22
|
+
this.magnitude = magnitude;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/* c8 ignore start -- debug only */
|
|
26
|
+
toString() {
|
|
27
|
+
return `${this.coefficient[0]}${this.coefficient.length > 1 ? `.${this.coefficient.slice(1)}` : ""}e${this.magnitude}`;
|
|
28
|
+
}
|
|
29
|
+
/* c8 ignore stop */
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Returns whether the node is number literal
|
|
34
|
+
* @param {Node} node the node literal being evaluated
|
|
35
|
+
* @returns {boolean} true if the node is a number literal
|
|
36
|
+
*/
|
|
37
|
+
function isNumber(node) {
|
|
38
|
+
return typeof node.value === "number";
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Gets the source code of the given number literal. Removes `_` numeric separators from the result.
|
|
43
|
+
* @param {Node} node the number `Literal` node
|
|
44
|
+
* @returns {string} raw source code of the literal, without numeric separators
|
|
45
|
+
*/
|
|
46
|
+
function getRaw(node) {
|
|
47
|
+
return node.raw.replace(/_/gu, "");
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Checks whether the number is base ten
|
|
52
|
+
* @param {ASTNode} node the node being evaluated
|
|
53
|
+
* @returns {boolean} true if the node is in base ten
|
|
54
|
+
*/
|
|
55
|
+
function isBaseTen(node) {
|
|
56
|
+
const prefixes = ["0x", "0X", "0b", "0B", "0o", "0O"];
|
|
57
|
+
|
|
58
|
+
return (
|
|
59
|
+
prefixes.every(prefix => !node.raw.startsWith(prefix)) &&
|
|
60
|
+
!/^0[0-7]+$/u.test(node.raw)
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Checks that the user-intended non-base ten number equals the actual number after is has been converted to the Number type
|
|
66
|
+
* @param {Node} node the node being evaluated
|
|
67
|
+
* @returns {boolean} true if they do not match
|
|
68
|
+
*/
|
|
69
|
+
function notBaseTenLosesPrecision(node) {
|
|
70
|
+
const rawString = getRaw(node).toUpperCase();
|
|
71
|
+
let base;
|
|
72
|
+
|
|
73
|
+
if (rawString.startsWith("0B")) {
|
|
74
|
+
base = 2;
|
|
75
|
+
} else if (rawString.startsWith("0X")) {
|
|
76
|
+
base = 16;
|
|
77
|
+
} else {
|
|
78
|
+
base = 8;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
return !rawString.endsWith(node.value.toString(base).toUpperCase());
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Returns the number stripped of leading zeros
|
|
86
|
+
* @param {string} numberAsString the string representation of the number
|
|
87
|
+
* @returns {string} the stripped string
|
|
88
|
+
*/
|
|
89
|
+
function removeLeadingZeros(numberAsString) {
|
|
90
|
+
for (let i = 0; i < numberAsString.length; i++) {
|
|
91
|
+
if (numberAsString[i] !== "0") {
|
|
92
|
+
return numberAsString.slice(i);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
return numberAsString;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Returns the number stripped of trailing zeros
|
|
100
|
+
* @param {string} numberAsString the string representation of the number
|
|
101
|
+
* @returns {string} the stripped string
|
|
102
|
+
*/
|
|
103
|
+
function removeTrailingZeros(numberAsString) {
|
|
104
|
+
for (let i = numberAsString.length - 1; i >= 0; i--) {
|
|
105
|
+
if (numberAsString[i] !== "0") {
|
|
106
|
+
return numberAsString.slice(0, i + 1);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
return numberAsString;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Converts an integer to an object containing the integer's coefficient and order of magnitude
|
|
114
|
+
* @param {string} stringInteger the string representation of the integer being converted
|
|
115
|
+
* @returns {ScientificNotation} the object containing the integer's coefficient and order of magnitude
|
|
116
|
+
*/
|
|
117
|
+
function normalizeInteger(stringInteger) {
|
|
118
|
+
const trimmedInteger = removeLeadingZeros(stringInteger);
|
|
119
|
+
const significantDigits = removeTrailingZeros(trimmedInteger);
|
|
120
|
+
|
|
121
|
+
return new ScientificNotation(significantDigits, trimmedInteger.length - 1);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Converts a float to an object containing the float's coefficient and order of magnitude
|
|
126
|
+
* @param {string} stringFloat the string representation of the float being converted
|
|
127
|
+
* @returns {ScientificNotation} the object containing the float's coefficient and order of magnitude
|
|
128
|
+
*/
|
|
129
|
+
function normalizeFloat(stringFloat) {
|
|
130
|
+
const trimmedFloat = removeLeadingZeros(stringFloat);
|
|
131
|
+
const indexOfDecimalPoint = trimmedFloat.indexOf(".");
|
|
132
|
+
|
|
133
|
+
switch (indexOfDecimalPoint) {
|
|
134
|
+
case 0: {
|
|
135
|
+
const significantDigits = removeLeadingZeros(trimmedFloat.slice(1));
|
|
136
|
+
|
|
137
|
+
return new ScientificNotation(
|
|
138
|
+
significantDigits,
|
|
139
|
+
significantDigits.length - trimmedFloat.length,
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
case -1:
|
|
143
|
+
return new ScientificNotation(
|
|
144
|
+
trimmedFloat,
|
|
145
|
+
trimmedFloat.length - 1,
|
|
146
|
+
);
|
|
147
|
+
default:
|
|
148
|
+
return new ScientificNotation(
|
|
149
|
+
trimmedFloat.replace(".", ""),
|
|
150
|
+
indexOfDecimalPoint - 1,
|
|
151
|
+
);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Converts a base ten number to proper scientific notation
|
|
157
|
+
* @param {string} stringNumber the string representation of the base ten number to be converted
|
|
158
|
+
* @param {boolean} parseAsFloat if true, the coefficient will be always parsed as a float, regardless of whether a decimal point is present
|
|
159
|
+
* @returns {ScientificNotation} the object containing the number's coefficient and order of magnitude
|
|
160
|
+
*/
|
|
161
|
+
function convertNumberToScientificNotation(stringNumber, parseAsFloat) {
|
|
162
|
+
const splitNumber = stringNumber.split("e");
|
|
163
|
+
const originalCoefficient = splitNumber[0];
|
|
164
|
+
const normalizedNumber =
|
|
165
|
+
parseAsFloat || stringNumber.includes(".")
|
|
166
|
+
? normalizeFloat(originalCoefficient)
|
|
167
|
+
: normalizeInteger(originalCoefficient);
|
|
168
|
+
if (splitNumber.length > 1) {
|
|
169
|
+
normalizedNumber.magnitude += parseInt(splitNumber[1], 10);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
return normalizedNumber;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Checks that the user-intended base ten number equals the actual number after is has been converted to the Number type
|
|
177
|
+
* @param {Node} node the node being evaluated
|
|
178
|
+
* @returns {boolean} true if they do not match
|
|
179
|
+
*/
|
|
180
|
+
function baseTenLosesPrecision(node) {
|
|
181
|
+
const rawNumber = getRaw(node).toLowerCase();
|
|
182
|
+
const normalizedRawNumber = convertNumberToScientificNotation(
|
|
183
|
+
rawNumber,
|
|
184
|
+
false,
|
|
185
|
+
);
|
|
186
|
+
const requestedPrecision = normalizedRawNumber.coefficient.length;
|
|
187
|
+
|
|
188
|
+
if (requestedPrecision > 100) {
|
|
189
|
+
return true;
|
|
190
|
+
}
|
|
191
|
+
const storedNumber = node.value.toPrecision(requestedPrecision);
|
|
192
|
+
const normalizedStoredNumber = convertNumberToScientificNotation(
|
|
193
|
+
storedNumber,
|
|
194
|
+
true,
|
|
195
|
+
);
|
|
196
|
+
|
|
197
|
+
return (
|
|
198
|
+
normalizedRawNumber.magnitude !== normalizedStoredNumber.magnitude ||
|
|
199
|
+
normalizedRawNumber.coefficient !== normalizedStoredNumber.coefficient
|
|
200
|
+
);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Checks that the user-intended number equals the actual number after is has been converted to the Number type
|
|
205
|
+
* @param {Node} node the node being evaluated
|
|
206
|
+
* @returns {boolean} true if they do not match
|
|
207
|
+
*/
|
|
208
|
+
function losesPrecision(node) {
|
|
209
|
+
return isBaseTen(node)
|
|
210
|
+
? baseTenLosesPrecision(node)
|
|
211
|
+
: notBaseTenLosesPrecision(node);
|
|
212
|
+
}
|
|
213
|
+
|
|
8
214
|
//------------------------------------------------------------------------------
|
|
9
215
|
// Rule Definition
|
|
10
216
|
//------------------------------------------------------------------------------
|
|
@@ -29,214 +235,6 @@ module.exports = {
|
|
|
29
235
|
},
|
|
30
236
|
|
|
31
237
|
create(context) {
|
|
32
|
-
/**
|
|
33
|
-
* Returns whether the node is number literal
|
|
34
|
-
* @param {Node} node the node literal being evaluated
|
|
35
|
-
* @returns {boolean} true if the node is a number literal
|
|
36
|
-
*/
|
|
37
|
-
function isNumber(node) {
|
|
38
|
-
return typeof node.value === "number";
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Gets the source code of the given number literal. Removes `_` numeric separators from the result.
|
|
43
|
-
* @param {Node} node the number `Literal` node
|
|
44
|
-
* @returns {string} raw source code of the literal, without numeric separators
|
|
45
|
-
*/
|
|
46
|
-
function getRaw(node) {
|
|
47
|
-
return node.raw.replace(/_/gu, "");
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* Checks whether the number is base ten
|
|
52
|
-
* @param {ASTNode} node the node being evaluated
|
|
53
|
-
* @returns {boolean} true if the node is in base ten
|
|
54
|
-
*/
|
|
55
|
-
function isBaseTen(node) {
|
|
56
|
-
const prefixes = ["0x", "0X", "0b", "0B", "0o", "0O"];
|
|
57
|
-
|
|
58
|
-
return (
|
|
59
|
-
prefixes.every(prefix => !node.raw.startsWith(prefix)) &&
|
|
60
|
-
!/^0[0-7]+$/u.test(node.raw)
|
|
61
|
-
);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* Checks that the user-intended non-base ten number equals the actual number after is has been converted to the Number type
|
|
66
|
-
* @param {Node} node the node being evaluated
|
|
67
|
-
* @returns {boolean} true if they do not match
|
|
68
|
-
*/
|
|
69
|
-
function notBaseTenLosesPrecision(node) {
|
|
70
|
-
const rawString = getRaw(node).toUpperCase();
|
|
71
|
-
let base;
|
|
72
|
-
|
|
73
|
-
if (rawString.startsWith("0B")) {
|
|
74
|
-
base = 2;
|
|
75
|
-
} else if (rawString.startsWith("0X")) {
|
|
76
|
-
base = 16;
|
|
77
|
-
} else {
|
|
78
|
-
base = 8;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
return !rawString.endsWith(node.value.toString(base).toUpperCase());
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* Adds a decimal point to the numeric string at index 1
|
|
86
|
-
* @param {string} stringNumber the numeric string without any decimal point
|
|
87
|
-
* @returns {string} the numeric string with a decimal point in the proper place
|
|
88
|
-
*/
|
|
89
|
-
function addDecimalPointToNumber(stringNumber) {
|
|
90
|
-
return `${stringNumber[0]}.${stringNumber.slice(1)}`;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* Returns the number stripped of leading zeros
|
|
95
|
-
* @param {string} numberAsString the string representation of the number
|
|
96
|
-
* @returns {string} the stripped string
|
|
97
|
-
*/
|
|
98
|
-
function removeLeadingZeros(numberAsString) {
|
|
99
|
-
for (let i = 0; i < numberAsString.length; i++) {
|
|
100
|
-
if (numberAsString[i] !== "0") {
|
|
101
|
-
return numberAsString.slice(i);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
return numberAsString;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
/**
|
|
108
|
-
* Returns the number stripped of trailing zeros
|
|
109
|
-
* @param {string} numberAsString the string representation of the number
|
|
110
|
-
* @returns {string} the stripped string
|
|
111
|
-
*/
|
|
112
|
-
function removeTrailingZeros(numberAsString) {
|
|
113
|
-
for (let i = numberAsString.length - 1; i >= 0; i--) {
|
|
114
|
-
if (numberAsString[i] !== "0") {
|
|
115
|
-
return numberAsString.slice(0, i + 1);
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
return numberAsString;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* Converts an integer to an object containing the integer's coefficient and order of magnitude
|
|
123
|
-
* @param {string} stringInteger the string representation of the integer being converted
|
|
124
|
-
* @returns {Object} the object containing the integer's coefficient and order of magnitude
|
|
125
|
-
*/
|
|
126
|
-
function normalizeInteger(stringInteger) {
|
|
127
|
-
const trimmedInteger = removeLeadingZeros(stringInteger);
|
|
128
|
-
const significantDigits = removeTrailingZeros(trimmedInteger);
|
|
129
|
-
|
|
130
|
-
return {
|
|
131
|
-
magnitude: trimmedInteger.length - 1,
|
|
132
|
-
coefficient: addDecimalPointToNumber(significantDigits),
|
|
133
|
-
};
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
/**
|
|
137
|
-
*
|
|
138
|
-
* Converts a float to an object containing the floats's coefficient and order of magnitude
|
|
139
|
-
* @param {string} stringFloat the string representation of the float being converted
|
|
140
|
-
* @returns {Object} the object containing the float's coefficient and order of magnitude
|
|
141
|
-
*/
|
|
142
|
-
function normalizeFloat(stringFloat) {
|
|
143
|
-
const trimmedFloat = removeLeadingZeros(stringFloat);
|
|
144
|
-
|
|
145
|
-
if (trimmedFloat.startsWith(".")) {
|
|
146
|
-
const decimalDigits = trimmedFloat.slice(1);
|
|
147
|
-
const significantDigits = removeLeadingZeros(decimalDigits);
|
|
148
|
-
|
|
149
|
-
return {
|
|
150
|
-
magnitude:
|
|
151
|
-
significantDigits.length - decimalDigits.length - 1,
|
|
152
|
-
coefficient: addDecimalPointToNumber(significantDigits),
|
|
153
|
-
};
|
|
154
|
-
}
|
|
155
|
-
return {
|
|
156
|
-
magnitude: trimmedFloat.indexOf(".") - 1,
|
|
157
|
-
coefficient: addDecimalPointToNumber(
|
|
158
|
-
trimmedFloat.replace(".", ""),
|
|
159
|
-
),
|
|
160
|
-
};
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
/**
|
|
164
|
-
* Converts a base ten number to proper scientific notation
|
|
165
|
-
* @param {string} stringNumber the string representation of the base ten number to be converted
|
|
166
|
-
* @returns {string} the number converted to scientific notation
|
|
167
|
-
*/
|
|
168
|
-
function convertNumberToScientificNotation(stringNumber) {
|
|
169
|
-
const splitNumber = stringNumber.split("e");
|
|
170
|
-
const originalCoefficient = splitNumber[0];
|
|
171
|
-
const normalizedNumber = stringNumber.includes(".")
|
|
172
|
-
? normalizeFloat(originalCoefficient)
|
|
173
|
-
: normalizeInteger(originalCoefficient);
|
|
174
|
-
const normalizedCoefficient = normalizedNumber.coefficient;
|
|
175
|
-
const magnitude =
|
|
176
|
-
splitNumber.length > 1
|
|
177
|
-
? parseInt(splitNumber[1], 10) + normalizedNumber.magnitude
|
|
178
|
-
: normalizedNumber.magnitude;
|
|
179
|
-
|
|
180
|
-
return `${normalizedCoefficient}e${magnitude}`;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
/**
|
|
184
|
-
* Checks that the user-intended base ten number equals the actual number after is has been converted to the Number type
|
|
185
|
-
* @param {Node} node the node being evaluated
|
|
186
|
-
* @returns {boolean} true if they do not match
|
|
187
|
-
*/
|
|
188
|
-
function baseTenLosesPrecision(node) {
|
|
189
|
-
const rawNumber = getRaw(node).toLowerCase();
|
|
190
|
-
|
|
191
|
-
/*
|
|
192
|
-
* If trailing zeros equal the exponent, this is a valid representation
|
|
193
|
-
* like "9.00e2" where 00 = 2 (meaning 9.00 * 10^2 = 900)
|
|
194
|
-
* https://github.com/eslint/eslint/issues/19957
|
|
195
|
-
*/
|
|
196
|
-
if (rawNumber.includes(".") && rawNumber.includes("e")) {
|
|
197
|
-
const parts = rawNumber.split("e");
|
|
198
|
-
const coefficient = parts[0];
|
|
199
|
-
const exponent = parseInt(parts[1], 10);
|
|
200
|
-
|
|
201
|
-
// Count trailing zeros after decimal
|
|
202
|
-
const decimalParts = coefficient.split(".");
|
|
203
|
-
if (decimalParts.length === 2) {
|
|
204
|
-
const decimalPart = decimalParts[1];
|
|
205
|
-
const trailingZeros = decimalPart.match(/0*$/u)[0].length;
|
|
206
|
-
|
|
207
|
-
if (trailingZeros === exponent) {
|
|
208
|
-
return false;
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
const normalizedRawNumber =
|
|
214
|
-
convertNumberToScientificNotation(rawNumber);
|
|
215
|
-
const requestedPrecision = normalizedRawNumber
|
|
216
|
-
.split("e")[0]
|
|
217
|
-
.replace(".", "").length;
|
|
218
|
-
|
|
219
|
-
if (requestedPrecision > 100) {
|
|
220
|
-
return true;
|
|
221
|
-
}
|
|
222
|
-
const storedNumber = node.value.toPrecision(requestedPrecision);
|
|
223
|
-
const normalizedStoredNumber =
|
|
224
|
-
convertNumberToScientificNotation(storedNumber);
|
|
225
|
-
|
|
226
|
-
return normalizedRawNumber !== normalizedStoredNumber;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
/**
|
|
230
|
-
* Checks that the user-intended number equals the actual number after is has been converted to the Number type
|
|
231
|
-
* @param {Node} node the node being evaluated
|
|
232
|
-
* @returns {boolean} true if they do not match
|
|
233
|
-
*/
|
|
234
|
-
function losesPrecision(node) {
|
|
235
|
-
return isBaseTen(node)
|
|
236
|
-
? baseTenLosesPrecision(node)
|
|
237
|
-
: notBaseTenLosesPrecision(node);
|
|
238
|
-
}
|
|
239
|
-
|
|
240
238
|
return {
|
|
241
239
|
Literal(node) {
|
|
242
240
|
if (node.value && isNumber(node) && losesPrecision(node)) {
|
|
@@ -17,7 +17,7 @@ module.exports = {
|
|
|
17
17
|
message: "Node.js rules were moved out of ESLint core.",
|
|
18
18
|
url: "https://eslint.org/docs/latest/use/migrating-to-7.0.0#deprecate-node-rules",
|
|
19
19
|
deprecatedSince: "7.0.0",
|
|
20
|
-
availableUntil:
|
|
20
|
+
availableUntil: "11.0.0",
|
|
21
21
|
replacedBy: [
|
|
22
22
|
{
|
|
23
23
|
message:
|
|
@@ -32,7 +32,7 @@ module.exports = {
|
|
|
32
32
|
"The new rule flags more situations where object literal syntax can be used, and it does not report a problem when the `Object` constructor is invoked with an argument.",
|
|
33
33
|
url: "https://eslint.org/blog/2023/09/eslint-v8.50.0-released/",
|
|
34
34
|
deprecatedSince: "8.50.0",
|
|
35
|
-
availableUntil:
|
|
35
|
+
availableUntil: "11.0.0",
|
|
36
36
|
replacedBy: [
|
|
37
37
|
{
|
|
38
38
|
rule: {
|
|
@@ -17,7 +17,7 @@ module.exports = {
|
|
|
17
17
|
message: "Node.js rules were moved out of ESLint core.",
|
|
18
18
|
url: "https://eslint.org/docs/latest/use/migrating-to-7.0.0#deprecate-node-rules",
|
|
19
19
|
deprecatedSince: "7.0.0",
|
|
20
|
-
availableUntil:
|
|
20
|
+
availableUntil: "11.0.0",
|
|
21
21
|
replacedBy: [
|
|
22
22
|
{
|
|
23
23
|
message:
|
|
@@ -25,7 +25,7 @@ module.exports = {
|
|
|
25
25
|
message: "The rule was replaced with a more general rule.",
|
|
26
26
|
url: "https://eslint.org/docs/latest/use/migrate-to-9.0.0#eslint-recommended",
|
|
27
27
|
deprecatedSince: "9.0.0",
|
|
28
|
-
availableUntil:
|
|
28
|
+
availableUntil: "11.0.0",
|
|
29
29
|
replacedBy: [
|
|
30
30
|
{
|
|
31
31
|
rule: {
|
|
@@ -16,7 +16,7 @@ module.exports = {
|
|
|
16
16
|
message: "Node.js rules were moved out of ESLint core.",
|
|
17
17
|
url: "https://eslint.org/docs/latest/use/migrating-to-7.0.0#deprecate-node-rules",
|
|
18
18
|
deprecatedSince: "7.0.0",
|
|
19
|
-
availableUntil:
|
|
19
|
+
availableUntil: "11.0.0",
|
|
20
20
|
replacedBy: [
|
|
21
21
|
{
|
|
22
22
|
message:
|
|
@@ -16,7 +16,7 @@ module.exports = {
|
|
|
16
16
|
message: "Node.js rules were moved out of ESLint core.",
|
|
17
17
|
url: "https://eslint.org/docs/latest/use/migrating-to-7.0.0#deprecate-node-rules",
|
|
18
18
|
deprecatedSince: "7.0.0",
|
|
19
|
-
availableUntil:
|
|
19
|
+
availableUntil: "11.0.0",
|
|
20
20
|
replacedBy: [
|
|
21
21
|
{
|
|
22
22
|
message:
|
|
@@ -16,7 +16,7 @@ module.exports = {
|
|
|
16
16
|
message: "Node.js rules were moved out of ESLint core.",
|
|
17
17
|
url: "https://eslint.org/docs/latest/use/migrating-to-7.0.0#deprecate-node-rules",
|
|
18
18
|
deprecatedSince: "7.0.0",
|
|
19
|
-
availableUntil:
|
|
19
|
+
availableUntil: "11.0.0",
|
|
20
20
|
replacedBy: [
|
|
21
21
|
{
|
|
22
22
|
message:
|
|
@@ -52,7 +52,7 @@ module.exports = {
|
|
|
52
52
|
message: "Node.js rules were moved out of ESLint core.",
|
|
53
53
|
url: "https://eslint.org/docs/latest/use/migrating-to-7.0.0#deprecate-node-rules",
|
|
54
54
|
deprecatedSince: "7.0.0",
|
|
55
|
-
availableUntil:
|
|
55
|
+
availableUntil: "11.0.0",
|
|
56
56
|
replacedBy: [
|
|
57
57
|
{
|
|
58
58
|
message:
|
package/lib/rules/no-sync.js
CHANGED
|
@@ -17,7 +17,7 @@ module.exports = {
|
|
|
17
17
|
message: "Node.js rules were moved out of ESLint core.",
|
|
18
18
|
url: "https://eslint.org/docs/latest/use/migrating-to-7.0.0#deprecate-node-rules",
|
|
19
19
|
deprecatedSince: "7.0.0",
|
|
20
|
-
availableUntil:
|
|
20
|
+
availableUntil: "11.0.0",
|
|
21
21
|
replacedBy: [
|
|
22
22
|
{
|
|
23
23
|
message:
|