immosquare-cleaner 0.1.40 → 0.1.41
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/immosquare-cleaner/version.rb +1 -1
- data/node_modules/@eslint/config-array/README.md +9 -3
- data/node_modules/@eslint/config-array/dist/cjs/index.cjs +1 -0
- data/node_modules/@eslint/config-array/dist/esm/index.js +1 -0
- data/node_modules/@eslint/config-array/package.json +2 -2
- data/node_modules/@eslint/eslintrc/node_modules/espree/LICENSE +25 -0
- data/node_modules/@eslint/eslintrc/node_modules/espree/README.md +244 -0
- data/node_modules/@eslint/eslintrc/node_modules/espree/dist/espree.cjs +883 -0
- data/node_modules/@eslint/eslintrc/node_modules/espree/espree.js +177 -0
- data/node_modules/@eslint/eslintrc/node_modules/espree/lib/espree.js +349 -0
- data/node_modules/@eslint/eslintrc/node_modules/espree/lib/features.js +27 -0
- data/node_modules/@eslint/eslintrc/node_modules/espree/lib/options.js +123 -0
- data/node_modules/@eslint/eslintrc/node_modules/espree/lib/token-translator.js +263 -0
- data/node_modules/@eslint/eslintrc/node_modules/espree/lib/version.js +3 -0
- data/node_modules/@eslint/eslintrc/node_modules/espree/node_modules/acorn/CHANGELOG.md +880 -0
- data/node_modules/@eslint/eslintrc/node_modules/espree/node_modules/acorn/LICENSE +21 -0
- data/node_modules/@eslint/eslintrc/node_modules/espree/node_modules/acorn/README.md +283 -0
- data/node_modules/@eslint/eslintrc/node_modules/espree/node_modules/acorn/bin/acorn +4 -0
- data/node_modules/@eslint/eslintrc/node_modules/espree/node_modules/acorn/dist/acorn.d.mts +857 -0
- data/node_modules/@eslint/eslintrc/node_modules/espree/node_modules/acorn/dist/acorn.d.ts +857 -0
- data/node_modules/@eslint/eslintrc/node_modules/espree/node_modules/acorn/dist/acorn.js +6002 -0
- data/node_modules/@eslint/eslintrc/node_modules/espree/node_modules/acorn/dist/acorn.mjs +5973 -0
- data/node_modules/@eslint/eslintrc/node_modules/espree/node_modules/acorn/dist/bin.js +90 -0
- data/node_modules/@eslint/eslintrc/node_modules/espree/node_modules/acorn/package.json +50 -0
- data/node_modules/@eslint/eslintrc/node_modules/espree/package.json +86 -0
- data/node_modules/@eslint/js/package.json +1 -1
- data/node_modules/@eslint-community/regexpp/index.d.ts +19 -5
- data/node_modules/@eslint-community/regexpp/index.js +138 -17
- data/node_modules/@eslint-community/regexpp/index.js.map +1 -1
- data/node_modules/@eslint-community/regexpp/index.mjs +138 -17
- data/node_modules/@eslint-community/regexpp/index.mjs.map +1 -1
- data/node_modules/@eslint-community/regexpp/package.json +1 -3
- data/node_modules/acorn/CHANGELOG.md +24 -0
- data/node_modules/acorn/README.md +5 -6
- data/node_modules/acorn/dist/acorn.d.mts +8 -9
- data/node_modules/acorn/dist/acorn.d.ts +8 -9
- data/node_modules/acorn/dist/acorn.js +92 -29
- data/node_modules/acorn/dist/acorn.mjs +92 -29
- data/node_modules/acorn/package.json +3 -3
- data/node_modules/eslint/README.md +7 -8
- data/node_modules/eslint/conf/ecma-version.js +1 -1
- data/node_modules/eslint/conf/globals.js +6 -1
- data/node_modules/eslint/lib/cli.js +23 -2
- data/node_modules/eslint/lib/eslint/eslint-helpers.js +5 -0
- data/node_modules/eslint/lib/eslint/eslint.js +16 -2
- data/node_modules/eslint/lib/eslint/legacy-eslint.js +14 -0
- data/node_modules/eslint/lib/languages/js/index.js +10 -5
- data/node_modules/eslint/lib/languages/js/source-code/source-code.js +16 -6
- data/node_modules/eslint/lib/linter/apply-disable-directives.js +6 -3
- data/node_modules/eslint/lib/linter/config-comment-parser.js +3 -16
- data/node_modules/eslint/lib/linter/linter.js +194 -149
- data/node_modules/eslint/lib/linter/node-event-generator.js +2 -4
- data/node_modules/eslint/lib/linter/vfile.js +7 -0
- data/node_modules/eslint/lib/options.js +13 -1
- data/node_modules/eslint/lib/rules/no-restricted-imports.js +12 -5
- data/node_modules/eslint/lib/rules/no-unused-vars.js +34 -32
- data/node_modules/eslint/lib/rules/no-useless-backreference.js +81 -31
- data/node_modules/eslint/lib/rules/utils/regular-expressions.js +1 -1
- data/node_modules/eslint/lib/shared/flags.js +26 -0
- data/node_modules/eslint/lib/shared/logging.js +10 -1
- data/node_modules/eslint/lib/shared/types.js +1 -1
- data/node_modules/eslint/package.json +9 -13
- data/node_modules/eslint-scope/dist/eslint-scope.cjs +2 -2
- data/node_modules/eslint-scope/lib/referencer.js +1 -1
- data/node_modules/eslint-scope/lib/version.js +1 -1
- data/node_modules/eslint-scope/package.json +2 -2
- data/node_modules/espree/README.md +5 -5
- data/node_modules/espree/dist/espree.cjs +62 -6
- data/node_modules/espree/espree.js +1 -4
- data/node_modules/espree/lib/options.js +3 -2
- data/node_modules/espree/lib/token-translator.js +1 -1
- data/node_modules/espree/lib/version.js +1 -1
- data/node_modules/espree/package.json +7 -7
- data/node_modules/js-tokens/CHANGELOG.md +17 -0
- data/node_modules/js-tokens/LICENSE +1 -1
- data/node_modules/js-tokens/README.md +25 -7
- data/node_modules/js-tokens/index.js +3 -3
- data/node_modules/js-tokens/package.json +5 -5
- data/node_modules/jscodeshift/CHANGELOG.md +5 -0
- data/node_modules/jscodeshift/bin/jscodeshift.js +1 -1
- data/node_modules/jscodeshift/package.json +1 -2
- data/node_modules/jscodeshift/website/index.htm +9 -0
- data/node_modules/prettier/LICENSE +35 -34
- data/node_modules/prettier/doc.js +2 -2
- data/node_modules/prettier/doc.mjs +2 -2
- data/node_modules/prettier/index.cjs +8 -8
- data/node_modules/prettier/index.d.ts +1 -2
- data/node_modules/prettier/index.mjs +636 -704
- data/node_modules/prettier/internal/cli.mjs +4 -4
- data/node_modules/prettier/package.json +1 -1
- data/node_modules/prettier/plugins/acorn.js +14 -12
- data/node_modules/prettier/plugins/acorn.mjs +14 -12
- data/node_modules/prettier/plugins/angular.js +1 -1
- data/node_modules/prettier/plugins/angular.mjs +1 -1
- data/node_modules/prettier/plugins/babel.js +10 -11
- data/node_modules/prettier/plugins/babel.mjs +10 -11
- data/node_modules/prettier/plugins/estree.js +27 -27
- data/node_modules/prettier/plugins/estree.mjs +27 -27
- data/node_modules/prettier/plugins/flow.js +15 -16
- data/node_modules/prettier/plugins/flow.mjs +15 -16
- data/node_modules/prettier/plugins/glimmer.js +5 -5
- data/node_modules/prettier/plugins/glimmer.mjs +5 -5
- data/node_modules/prettier/plugins/graphql.js +8 -8
- data/node_modules/prettier/plugins/graphql.mjs +8 -8
- data/node_modules/prettier/plugins/html.js +17 -17
- data/node_modules/prettier/plugins/html.mjs +17 -17
- data/node_modules/prettier/plugins/markdown.js +44 -44
- data/node_modules/prettier/plugins/markdown.mjs +44 -44
- data/node_modules/prettier/plugins/meriyah.js +4 -5
- data/node_modules/prettier/plugins/meriyah.mjs +4 -5
- data/node_modules/prettier/plugins/postcss.js +26 -26
- data/node_modules/prettier/plugins/postcss.mjs +26 -26
- data/node_modules/prettier/plugins/typescript.js +15 -20
- data/node_modules/prettier/plugins/typescript.mjs +15 -20
- data/node_modules/prettier/plugins/yaml.js +6 -6
- data/node_modules/prettier/plugins/yaml.mjs +6 -6
- data/node_modules/prettier/standalone.js +31 -30
- data/node_modules/prettier/standalone.mjs +28 -27
- data/package.json +4 -4
- metadata +24 -2
@@ -147,6 +147,36 @@ module.exports = {
|
|
147
147
|
}
|
148
148
|
}
|
149
149
|
|
150
|
+
/**
|
151
|
+
* Determines what variable type a def is.
|
152
|
+
* @param {Object} def the declaration to check
|
153
|
+
* @returns {VariableType} a simple name for the types of variables that this rule supports
|
154
|
+
*/
|
155
|
+
function defToVariableType(def) {
|
156
|
+
|
157
|
+
/*
|
158
|
+
* This `destructuredArrayIgnorePattern` error report works differently from the catch
|
159
|
+
* clause and parameter error reports. _Both_ the `varsIgnorePattern` and the
|
160
|
+
* `destructuredArrayIgnorePattern` will be checked for array destructuring. However,
|
161
|
+
* for the purposes of the report, the currently defined behavior is to only inform the
|
162
|
+
* user of the `destructuredArrayIgnorePattern` if it's present (regardless of the fact
|
163
|
+
* that the `varsIgnorePattern` would also apply). If it's not present, the user will be
|
164
|
+
* informed of the `varsIgnorePattern`, assuming that's present.
|
165
|
+
*/
|
166
|
+
if (config.destructuredArrayIgnorePattern && def.name.parent.type === "ArrayPattern") {
|
167
|
+
return "array-destructure";
|
168
|
+
}
|
169
|
+
|
170
|
+
switch (def.type) {
|
171
|
+
case "CatchClause":
|
172
|
+
return "catch-clause";
|
173
|
+
case "Parameter":
|
174
|
+
return "parameter";
|
175
|
+
default:
|
176
|
+
return "variable";
|
177
|
+
}
|
178
|
+
}
|
179
|
+
|
150
180
|
/**
|
151
181
|
* Gets a given variable's description and configured ignore pattern
|
152
182
|
* based on the provided variableType
|
@@ -167,7 +197,7 @@ module.exports = {
|
|
167
197
|
|
168
198
|
case "catch-clause":
|
169
199
|
pattern = config.caughtErrorsIgnorePattern;
|
170
|
-
variableDescription = "
|
200
|
+
variableDescription = "caught errors";
|
171
201
|
break;
|
172
202
|
|
173
203
|
case "parameter":
|
@@ -202,28 +232,7 @@ module.exports = {
|
|
202
232
|
let additionalMessageData = "";
|
203
233
|
|
204
234
|
if (def) {
|
205
|
-
|
206
|
-
let variableDescription;
|
207
|
-
|
208
|
-
switch (def.type) {
|
209
|
-
case "CatchClause":
|
210
|
-
if (config.caughtErrorsIgnorePattern) {
|
211
|
-
[variableDescription, pattern] = getVariableDescription("catch-clause");
|
212
|
-
}
|
213
|
-
break;
|
214
|
-
|
215
|
-
case "Parameter":
|
216
|
-
if (config.argsIgnorePattern) {
|
217
|
-
[variableDescription, pattern] = getVariableDescription("parameter");
|
218
|
-
}
|
219
|
-
break;
|
220
|
-
|
221
|
-
default:
|
222
|
-
if (config.varsIgnorePattern) {
|
223
|
-
[variableDescription, pattern] = getVariableDescription("variable");
|
224
|
-
}
|
225
|
-
break;
|
226
|
-
}
|
235
|
+
const [variableDescription, pattern] = getVariableDescription(defToVariableType(def));
|
227
236
|
|
228
237
|
if (pattern && variableDescription) {
|
229
238
|
additionalMessageData = `. Allowed unused ${variableDescription} must match ${pattern}`;
|
@@ -248,14 +257,7 @@ module.exports = {
|
|
248
257
|
let additionalMessageData = "";
|
249
258
|
|
250
259
|
if (def) {
|
251
|
-
|
252
|
-
let variableDescription;
|
253
|
-
|
254
|
-
if (def.name.parent.type === "ArrayPattern" && config.destructuredArrayIgnorePattern) {
|
255
|
-
[variableDescription, pattern] = getVariableDescription("array-destructure");
|
256
|
-
} else if (config.varsIgnorePattern) {
|
257
|
-
[variableDescription, pattern] = getVariableDescription("variable");
|
258
|
-
}
|
260
|
+
const [variableDescription, pattern] = getVariableDescription(defToVariableType(def));
|
259
261
|
|
260
262
|
if (pattern && variableDescription) {
|
261
263
|
additionalMessageData = `. Allowed unused ${variableDescription} must match ${pattern}`;
|
@@ -338,7 +340,7 @@ module.exports = {
|
|
338
340
|
/**
|
339
341
|
* Determines if a variable has a sibling rest property
|
340
342
|
* @param {Variable} variable eslint-scope variable object.
|
341
|
-
* @returns {boolean} True if the variable
|
343
|
+
* @returns {boolean} True if the variable has a sibling rest property, false if not.
|
342
344
|
* @private
|
343
345
|
*/
|
344
346
|
function hasRestSpreadSibling(variable) {
|
@@ -72,11 +72,11 @@ module.exports = {
|
|
72
72
|
schema: [],
|
73
73
|
|
74
74
|
messages: {
|
75
|
-
nested: "Backreference '{{ bref }}' will be ignored. It references group '{{ group }}' from within that group.",
|
76
|
-
forward: "Backreference '{{ bref }}' will be ignored. It references group '{{ group }}' which appears later in the pattern.",
|
77
|
-
backward: "Backreference '{{ bref }}' will be ignored. It references group '{{ group }}' which appears before in the same lookbehind.",
|
78
|
-
disjunctive: "Backreference '{{ bref }}' will be ignored. It references group '{{ group }}' which is in another alternative.",
|
79
|
-
intoNegativeLookaround: "Backreference '{{ bref }}' will be ignored. It references group '{{ group }}' which is in a negative lookaround."
|
75
|
+
nested: "Backreference '{{ bref }}' will be ignored. It references group '{{ group }}'{{ otherGroups }} from within that group.",
|
76
|
+
forward: "Backreference '{{ bref }}' will be ignored. It references group '{{ group }}'{{ otherGroups }} which appears later in the pattern.",
|
77
|
+
backward: "Backreference '{{ bref }}' will be ignored. It references group '{{ group }}'{{ otherGroups }} which appears before in the same lookbehind.",
|
78
|
+
disjunctive: "Backreference '{{ bref }}' will be ignored. It references group '{{ group }}'{{ otherGroups }} which is in another alternative.",
|
79
|
+
intoNegativeLookaround: "Backreference '{{ bref }}' will be ignored. It references group '{{ group }}'{{ otherGroups }} which is in a negative lookaround."
|
80
80
|
}
|
81
81
|
},
|
82
82
|
|
@@ -104,16 +104,21 @@ module.exports = {
|
|
104
104
|
|
105
105
|
visitRegExpAST(regExpAST, {
|
106
106
|
onBackreferenceEnter(bref) {
|
107
|
-
const
|
108
|
-
brefPath = getPathToRoot(bref)
|
109
|
-
groupPath = getPathToRoot(group);
|
110
|
-
let messageId = null;
|
107
|
+
const groups = [bref.resolved].flat(),
|
108
|
+
brefPath = getPathToRoot(bref);
|
111
109
|
|
112
|
-
|
110
|
+
const problems = groups.map(group => {
|
111
|
+
const groupPath = getPathToRoot(group);
|
112
|
+
|
113
|
+
if (brefPath.includes(group)) {
|
114
|
+
|
115
|
+
// group is bref's ancestor => bref is nested ('nested reference') => group hasn't matched yet when bref starts to match.
|
116
|
+
return {
|
117
|
+
messageId: "nested",
|
118
|
+
group
|
119
|
+
};
|
120
|
+
}
|
113
121
|
|
114
|
-
// group is bref's ancestor => bref is nested ('nested reference') => group hasn't matched yet when bref starts to match.
|
115
|
-
messageId = "nested";
|
116
|
-
} else {
|
117
122
|
|
118
123
|
// Start from the root to find the lowest common ancestor.
|
119
124
|
let i = brefPath.length - 1,
|
@@ -130,35 +135,80 @@ module.exports = {
|
|
130
135
|
lowestCommonLookaround = commonPath.find(isLookaround),
|
131
136
|
isMatchingBackward = lowestCommonLookaround && lowestCommonLookaround.kind === "lookbehind";
|
132
137
|
|
138
|
+
if (groupCut.at(-1).type === "Alternative") {
|
139
|
+
|
140
|
+
// group's and bref's ancestor nodes below the lowest common ancestor are sibling alternatives => they're disjunctive.
|
141
|
+
return {
|
142
|
+
messageId: "disjunctive",
|
143
|
+
group
|
144
|
+
};
|
145
|
+
}
|
133
146
|
if (!isMatchingBackward && bref.end <= group.start) {
|
134
147
|
|
135
148
|
// bref is left, group is right ('forward reference') => group hasn't matched yet when bref starts to match.
|
136
|
-
|
137
|
-
|
149
|
+
return {
|
150
|
+
messageId: "forward",
|
151
|
+
group
|
152
|
+
};
|
153
|
+
}
|
154
|
+
if (isMatchingBackward && group.end <= bref.start) {
|
138
155
|
|
139
156
|
// the opposite of the previous when the regex is matching backward in a lookbehind context.
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
157
|
+
return {
|
158
|
+
messageId: "backward",
|
159
|
+
group
|
160
|
+
};
|
161
|
+
}
|
162
|
+
if (groupCut.some(isNegativeLookaround)) {
|
146
163
|
|
147
164
|
// group is in a negative lookaround which isn't bref's ancestor => group has already failed when bref starts to match.
|
148
|
-
|
165
|
+
return {
|
166
|
+
messageId: "intoNegativeLookaround",
|
167
|
+
group
|
168
|
+
};
|
149
169
|
}
|
170
|
+
|
171
|
+
return null;
|
172
|
+
});
|
173
|
+
|
174
|
+
if (problems.length === 0 || problems.some(problem => !problem)) {
|
175
|
+
|
176
|
+
// If there are no problems or no problems with any group then do not report it.
|
177
|
+
return;
|
150
178
|
}
|
151
179
|
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
180
|
+
let problemsToReport;
|
181
|
+
|
182
|
+
// Gets problems that appear in the same disjunction.
|
183
|
+
const problemsInSameDisjunction = problems.filter(problem => problem.messageId !== "disjunctive");
|
184
|
+
|
185
|
+
if (problemsInSameDisjunction.length) {
|
186
|
+
|
187
|
+
// Only report problems that appear in the same disjunction.
|
188
|
+
problemsToReport = problemsInSameDisjunction;
|
189
|
+
} else {
|
190
|
+
|
191
|
+
// If all groups appear in different disjunctions, report it.
|
192
|
+
problemsToReport = problems;
|
161
193
|
}
|
194
|
+
|
195
|
+
const [{ messageId, group }, ...other] = problemsToReport;
|
196
|
+
let otherGroups = "";
|
197
|
+
|
198
|
+
if (other.length === 1) {
|
199
|
+
otherGroups = " and another group";
|
200
|
+
} else if (other.length > 1) {
|
201
|
+
otherGroups = ` and other ${other.length} groups`;
|
202
|
+
}
|
203
|
+
context.report({
|
204
|
+
node,
|
205
|
+
messageId,
|
206
|
+
data: {
|
207
|
+
bref: bref.raw,
|
208
|
+
group: group.raw,
|
209
|
+
otherGroups
|
210
|
+
}
|
211
|
+
});
|
162
212
|
}
|
163
213
|
});
|
164
214
|
}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
/**
|
2
|
+
* @fileoverview Shared flags for ESLint.
|
3
|
+
*/
|
4
|
+
|
5
|
+
"use strict";
|
6
|
+
|
7
|
+
/**
|
8
|
+
* The set of flags that change ESLint behavior with a description.
|
9
|
+
* @type {Map<string, string>}
|
10
|
+
*/
|
11
|
+
const activeFlags = new Map([
|
12
|
+
["test_only", "This flag is only used for testing."]
|
13
|
+
]);
|
14
|
+
|
15
|
+
/**
|
16
|
+
* The set of flags that used to be active but no longer have an effect.
|
17
|
+
* @type {Map<string, string>}
|
18
|
+
*/
|
19
|
+
const inactiveFlags = new Map([
|
20
|
+
["test_only_old", "This flag is no longer used for testing."]
|
21
|
+
]);
|
22
|
+
|
23
|
+
module.exports = {
|
24
|
+
activeFlags,
|
25
|
+
inactiveFlags
|
26
|
+
};
|
@@ -11,7 +11,7 @@
|
|
11
11
|
module.exports = {
|
12
12
|
|
13
13
|
/**
|
14
|
-
* Cover for console.
|
14
|
+
* Cover for console.info
|
15
15
|
* @param {...any} args The elements to log.
|
16
16
|
* @returns {void}
|
17
17
|
*/
|
@@ -19,6 +19,15 @@ module.exports = {
|
|
19
19
|
console.log(...args);
|
20
20
|
},
|
21
21
|
|
22
|
+
/**
|
23
|
+
* Cover for console.warn
|
24
|
+
* @param {...any} args The elements to log.
|
25
|
+
* @returns {void}
|
26
|
+
*/
|
27
|
+
warn(...args) {
|
28
|
+
console.warn(...args);
|
29
|
+
},
|
30
|
+
|
22
31
|
/**
|
23
32
|
* Cover for console.error
|
24
33
|
* @param {...any} args The elements to log.
|
@@ -21,7 +21,7 @@ module.exports = {};
|
|
21
21
|
/**
|
22
22
|
* @typedef {Object} ParserOptions
|
23
23
|
* @property {EcmaFeatures} [ecmaFeatures] The optional features.
|
24
|
-
* @property {3|5|6|7|8|9|10|11|12|13|14|15|2015|2016|2017|2018|2019|2020|2021|2022|2023|2024} [ecmaVersion] The ECMAScript version (or revision number).
|
24
|
+
* @property {3|5|6|7|8|9|10|11|12|13|14|15|16|2015|2016|2017|2018|2019|2020|2021|2022|2023|2024|2025} [ecmaVersion] The ECMAScript version (or revision number).
|
25
25
|
* @property {"script"|"module"} [sourceType] The source code type.
|
26
26
|
* @property {boolean} [allowReserved] Allowing the use of reserved words as identifiers in ES3.
|
27
27
|
*/
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "eslint",
|
3
|
-
"version": "9.
|
3
|
+
"version": "9.7.0",
|
4
4
|
"author": "Nicholas C. Zakas <nicholas+npm@nczconsulting.com>",
|
5
5
|
"description": "An AST-based pattern checker for JavaScript.",
|
6
6
|
"bin": {
|
@@ -67,10 +67,10 @@
|
|
67
67
|
"bugs": "https://github.com/eslint/eslint/issues/",
|
68
68
|
"dependencies": {
|
69
69
|
"@eslint-community/eslint-utils": "^4.2.0",
|
70
|
-
"@eslint-community/regexpp": "^4.
|
71
|
-
"@eslint/config-array": "^0.
|
70
|
+
"@eslint-community/regexpp": "^4.11.0",
|
71
|
+
"@eslint/config-array": "^0.17.0",
|
72
72
|
"@eslint/eslintrc": "^3.1.0",
|
73
|
-
"@eslint/js": "9.
|
73
|
+
"@eslint/js": "9.7.0",
|
74
74
|
"@humanwhocodes/module-importer": "^1.0.1",
|
75
75
|
"@humanwhocodes/retry": "^0.3.0",
|
76
76
|
"@nodelib/fs.walk": "^1.2.8",
|
@@ -79,9 +79,9 @@
|
|
79
79
|
"cross-spawn": "^7.0.2",
|
80
80
|
"debug": "^4.3.2",
|
81
81
|
"escape-string-regexp": "^4.0.0",
|
82
|
-
"eslint-scope": "^8.0.
|
82
|
+
"eslint-scope": "^8.0.2",
|
83
83
|
"eslint-visitor-keys": "^4.0.0",
|
84
|
-
"espree": "^10.0
|
84
|
+
"espree": "^10.1.0",
|
85
85
|
"esquery": "^1.5.0",
|
86
86
|
"esutils": "^2.0.2",
|
87
87
|
"fast-deep-equal": "^3.1.3",
|
@@ -104,13 +104,12 @@
|
|
104
104
|
"devDependencies": {
|
105
105
|
"@babel/core": "^7.4.3",
|
106
106
|
"@babel/preset-env": "^7.4.3",
|
107
|
-
"@eslint
|
107
|
+
"@eslint/core": "^0.1.0",
|
108
108
|
"@types/estree": "^1.0.5",
|
109
109
|
"@types/node": "^20.11.5",
|
110
110
|
"@wdio/browser-runner": "^8.38.3",
|
111
111
|
"@wdio/cli": "^8.38.2",
|
112
112
|
"@wdio/concise-reporter": "^8.38.2",
|
113
|
-
"@wdio/globals": "^8.38.2",
|
114
113
|
"@wdio/mocha-framework": "^8.38.2",
|
115
114
|
"babel-loader": "^8.0.5",
|
116
115
|
"c8": "^7.12.0",
|
@@ -122,11 +121,8 @@
|
|
122
121
|
"eslint": "file:.",
|
123
122
|
"eslint-config-eslint": "file:packages/eslint-config-eslint",
|
124
123
|
"eslint-plugin-eslint-plugin": "^6.0.0",
|
125
|
-
"eslint-plugin-internal-rules": "file:tools/internal-rules",
|
126
|
-
"eslint-plugin-jsdoc": "^48.2.3",
|
127
|
-
"eslint-plugin-n": "^17.2.0",
|
128
|
-
"eslint-plugin-unicorn": "^52.0.0",
|
129
124
|
"eslint-release": "^3.2.2",
|
125
|
+
"eslint-rule-composer": "^0.3.0",
|
130
126
|
"eslump": "^3.0.0",
|
131
127
|
"esprima": "^4.0.1",
|
132
128
|
"fast-glob": "^3.2.11",
|
@@ -136,7 +132,7 @@
|
|
136
132
|
"got": "^11.8.3",
|
137
133
|
"gray-matter": "^4.0.3",
|
138
134
|
"js-yaml": "^4.1.0",
|
139
|
-
"knip": "^5.
|
135
|
+
"knip": "^5.21.0",
|
140
136
|
"lint-staged": "^11.0.0",
|
141
137
|
"load-perf": "^0.2.0",
|
142
138
|
"markdown-it": "^12.2.0",
|
@@ -1884,7 +1884,7 @@ class Referencer extends esrecurse__default["default"].Visitor {
|
|
1884
1884
|
this.currentScope().__define(pattern,
|
1885
1885
|
new Definition(
|
1886
1886
|
Variable.CatchClause,
|
1887
|
-
|
1887
|
+
pattern,
|
1888
1888
|
node,
|
1889
1889
|
null,
|
1890
1890
|
null,
|
@@ -2142,7 +2142,7 @@ class Referencer extends esrecurse__default["default"].Visitor {
|
|
2142
2142
|
|
2143
2143
|
/* vim: set sw=4 ts=4 et tw=80 : */
|
2144
2144
|
|
2145
|
-
const version = "8.0.
|
2145
|
+
const version = "8.0.2";
|
2146
2146
|
|
2147
2147
|
/*
|
2148
2148
|
Copyright (C) 2012-2014 Yusuke Suzuki <utatane.tea@gmail.com>
|
@@ -11,7 +11,7 @@
|
|
11
11
|
},
|
12
12
|
"./package.json": "./package.json"
|
13
13
|
},
|
14
|
-
"version": "8.0.
|
14
|
+
"version": "8.0.2",
|
15
15
|
"engines": {
|
16
16
|
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
17
17
|
},
|
@@ -59,7 +59,7 @@
|
|
59
59
|
"mocha": "^9.0.1",
|
60
60
|
"npm-license": "^0.3.3",
|
61
61
|
"rollup": "^2.52.7",
|
62
|
-
"shelljs": "^0.8.
|
62
|
+
"shelljs": "^0.8.5",
|
63
63
|
"typescript": "^5.4.2"
|
64
64
|
}
|
65
65
|
}
|
@@ -140,8 +140,8 @@ const options = {
|
|
140
140
|
// create a top-level tokens array containing all tokens
|
141
141
|
tokens: false,
|
142
142
|
|
143
|
-
// Set to 3, 5 (the default), 6, 7, 8, 9, 10, 11, 12, 13, 14 or
|
144
|
-
// You can also set to 2015 (same as 6), 2016 (same as 7), 2017 (same as 8), 2018 (same as 9), 2019 (same as 10), 2020 (same as 11), 2021 (same as 12), 2022 (same as 13), 2023 (same as 14)
|
143
|
+
// Set to 3, 5 (the default), 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 or 16 to specify the version of ECMAScript syntax you want to use.
|
144
|
+
// You can also set to 2015 (same as 6), 2016 (same as 7), 2017 (same as 8), 2018 (same as 9), 2019 (same as 10), 2020 (same as 11), 2021 (same as 12), 2022 (same as 13), 2023 (same as 14), 2024 (same as 15) or 2025 (same as 16) to use the year-based naming.
|
145
145
|
// You can also set "latest" to use the most recently supported version.
|
146
146
|
ecmaVersion: 3,
|
147
147
|
|
@@ -231,11 +231,11 @@ We are building on top of Acorn, however, so that we can contribute back and hel
|
|
231
231
|
|
232
232
|
### What ECMAScript features do you support?
|
233
233
|
|
234
|
-
Espree supports all ECMAScript
|
234
|
+
Espree supports all ECMAScript 2024 features and partially supports ECMAScript 2025 features.
|
235
235
|
|
236
|
-
Because ECMAScript
|
236
|
+
Because ECMAScript 2025 is still under development, we are implementing features as they are finalized. Currently, Espree supports:
|
237
237
|
|
238
|
-
* [RegExp
|
238
|
+
* [RegExp Duplicate named capturing groups](https://github.com/tc39/proposal-duplicate-named-capturing-groups)
|
239
239
|
|
240
240
|
See [finished-proposals.md](https://github.com/tc39/proposals/blob/master/finished-proposals.md) to know what features are finalized.
|
241
241
|
|
@@ -72,7 +72,7 @@ const Token = {
|
|
72
72
|
*/
|
73
73
|
function convertTemplatePart(tokens, code) {
|
74
74
|
const firstToken = tokens[0],
|
75
|
-
lastTemplateToken = tokens
|
75
|
+
lastTemplateToken = tokens.at(-1);
|
76
76
|
|
77
77
|
const token = {
|
78
78
|
type: Token.Template,
|
@@ -309,7 +309,8 @@ const SUPPORTED_VERSIONS = [
|
|
309
309
|
12, // 2021
|
310
310
|
13, // 2022
|
311
311
|
14, // 2023
|
312
|
-
15 // 2024
|
312
|
+
15, // 2024
|
313
|
+
16 // 2025
|
313
314
|
];
|
314
315
|
|
315
316
|
/**
|
@@ -317,7 +318,7 @@ const SUPPORTED_VERSIONS = [
|
|
317
318
|
* @returns {number} The latest ECMAScript version.
|
318
319
|
*/
|
319
320
|
function getLatestEcmaVersion() {
|
320
|
-
return SUPPORTED_VERSIONS
|
321
|
+
return SUPPORTED_VERSIONS.at(-1);
|
321
322
|
}
|
322
323
|
|
323
324
|
/**
|
@@ -759,9 +760,64 @@ var espree = () => Parser => {
|
|
759
760
|
};
|
760
761
|
};
|
761
762
|
|
762
|
-
const version$1 = "10.0
|
763
|
+
const version$1 = "10.1.0";
|
763
764
|
|
764
|
-
|
765
|
+
/**
|
766
|
+
* @fileoverview Main Espree file that converts Acorn into Esprima output.
|
767
|
+
*
|
768
|
+
* This file contains code from the following MIT-licensed projects:
|
769
|
+
* 1. Acorn
|
770
|
+
* 2. Babylon
|
771
|
+
* 3. Babel-ESLint
|
772
|
+
*
|
773
|
+
* This file also contains code from Esprima, which is BSD licensed.
|
774
|
+
*
|
775
|
+
* Acorn is Copyright 2012-2015 Acorn Contributors (https://github.com/marijnh/acorn/blob/master/AUTHORS)
|
776
|
+
* Babylon is Copyright 2014-2015 various contributors (https://github.com/babel/babel/blob/master/packages/babylon/AUTHORS)
|
777
|
+
* Babel-ESLint is Copyright 2014-2015 Sebastian McKenzie <sebmck@gmail.com>
|
778
|
+
*
|
779
|
+
* Redistribution and use in source and binary forms, with or without
|
780
|
+
* modification, are permitted provided that the following conditions are met:
|
781
|
+
*
|
782
|
+
* * Redistributions of source code must retain the above copyright
|
783
|
+
* notice, this list of conditions and the following disclaimer.
|
784
|
+
* * Redistributions in binary form must reproduce the above copyright
|
785
|
+
* notice, this list of conditions and the following disclaimer in the
|
786
|
+
* documentation and/or other materials provided with the distribution.
|
787
|
+
*
|
788
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
789
|
+
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
790
|
+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
791
|
+
* ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
|
792
|
+
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
793
|
+
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
794
|
+
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
795
|
+
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
796
|
+
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
797
|
+
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
798
|
+
*
|
799
|
+
* Esprima is Copyright (c) jQuery Foundation, Inc. and Contributors, All Rights Reserved.
|
800
|
+
*
|
801
|
+
* Redistribution and use in source and binary forms, with or without
|
802
|
+
* modification, are permitted provided that the following conditions are met:
|
803
|
+
*
|
804
|
+
* * Redistributions of source code must retain the above copyright
|
805
|
+
* notice, this list of conditions and the following disclaimer.
|
806
|
+
* * Redistributions in binary form must reproduce the above copyright
|
807
|
+
* notice, this list of conditions and the following disclaimer in the
|
808
|
+
* documentation and/or other materials provided with the distribution.
|
809
|
+
*
|
810
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
811
|
+
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
812
|
+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
813
|
+
* ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
|
814
|
+
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
815
|
+
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
816
|
+
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
817
|
+
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
818
|
+
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
819
|
+
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
820
|
+
*/
|
765
821
|
|
766
822
|
|
767
823
|
// To initialize lazily.
|
@@ -857,7 +913,7 @@ const Syntax = (function() {
|
|
857
913
|
}
|
858
914
|
|
859
915
|
for (key in VisitorKeys) {
|
860
|
-
if (Object.
|
916
|
+
if (Object.hasOwn(VisitorKeys, key)) {
|
861
917
|
types[key] = key;
|
862
918
|
}
|
863
919
|
}
|
@@ -1,5 +1,3 @@
|
|
1
|
-
/* eslint-disable jsdoc/no-multi-asterisks -- needed to preserve original formatting of licences */
|
2
|
-
|
3
1
|
/**
|
4
2
|
* @fileoverview Main Espree file that converts Acorn into Esprima output.
|
5
3
|
*
|
@@ -57,7 +55,6 @@
|
|
57
55
|
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
58
56
|
*/
|
59
57
|
|
60
|
-
/* eslint-enable jsdoc/no-multi-asterisks -- needed to preserve original formatting of licences */
|
61
58
|
|
62
59
|
import * as acorn from "acorn";
|
63
60
|
import jsx from "acorn-jsx";
|
@@ -160,7 +157,7 @@ export const Syntax = (function() {
|
|
160
157
|
}
|
161
158
|
|
162
159
|
for (key in VisitorKeys) {
|
163
|
-
if (Object.
|
160
|
+
if (Object.hasOwn(VisitorKeys, key)) {
|
164
161
|
types[key] = key;
|
165
162
|
}
|
166
163
|
}
|
@@ -19,7 +19,8 @@ const SUPPORTED_VERSIONS = [
|
|
19
19
|
12, // 2021
|
20
20
|
13, // 2022
|
21
21
|
14, // 2023
|
22
|
-
15 // 2024
|
22
|
+
15, // 2024
|
23
|
+
16 // 2025
|
23
24
|
];
|
24
25
|
|
25
26
|
/**
|
@@ -27,7 +28,7 @@ const SUPPORTED_VERSIONS = [
|
|
27
28
|
* @returns {number} The latest ECMAScript version.
|
28
29
|
*/
|
29
30
|
export function getLatestEcmaVersion() {
|
30
|
-
return SUPPORTED_VERSIONS
|
31
|
+
return SUPPORTED_VERSIONS.at(-1);
|
31
32
|
}
|
32
33
|
|
33
34
|
/**
|