eslint 9.11.1 → 9.12.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/lib/cli-engine/formatters/stylish.js +2 -2
- package/lib/cli.js +1 -6
- package/lib/config/config-loader.js +694 -0
- package/lib/eslint/eslint-helpers.js +128 -134
- package/lib/eslint/eslint.js +84 -294
- package/lib/rule-tester/rule-tester.js +33 -2
- package/lib/rules/complexity.js +16 -6
- package/lib/shared/flags.js +1 -0
- package/lib/unsupported-api.js +2 -1
- package/package.json +25 -12
package/README.md
CHANGED
@@ -299,7 +299,7 @@ The following companies, organizations, and individuals support ESLint's ongoing
|
|
299
299
|
<p><a href="https://automattic.com"><img src="https://images.opencollective.com/automattic/d0ef3e1/logo.png" alt="Automattic" height="128"></a> <a href="https://www.airbnb.com/"><img src="https://images.opencollective.com/airbnb/d327d66/logo.png" alt="Airbnb" height="128"></a></p><h3>Gold Sponsors</h3>
|
300
300
|
<p><a href="https://trunk.io/"><img src="https://images.opencollective.com/trunkio/fb92d60/avatar.png" alt="trunk.io" height="96"></a></p><h3>Silver Sponsors</h3>
|
301
301
|
<p><a href="https://www.jetbrains.com/"><img src="https://images.opencollective.com/jetbrains/fe76f99/logo.png" alt="JetBrains" height="64"></a> <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> <a href="https://www.workleap.com"><img src="https://avatars.githubusercontent.com/u/53535748?u=d1e55d7661d724bf2281c1bfd33cb8f99fe2465f&v=4" alt="Workleap" height="64"></a></p><h3>Bronze Sponsors</h3>
|
302
|
-
<p><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://nx.dev"><img src="https://avatars.githubusercontent.com/u/23692104?v=4" alt="Nx" height="32"></a> <a href="https://herocoders.com"><img src="https://avatars.githubusercontent.com/u/37549774?v=4" alt="HeroCoders" height="32"></a> <a href="https://usenextbase.com"><img src="https://avatars.githubusercontent.com/u/145838380?v=4" alt="Nextbase Starter Kit" height="32"></a></p>
|
302
|
+
<p><a href="https://www.wordhint.net/"><img src="https://images.opencollective.com/wordhint/be86813/avatar.png" alt="WordHint" 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://www.gitbook.com"><img src="https://avatars.githubusercontent.com/u/7111340?v=4" alt="GitBook" height="32"></a> <a href="https://nx.dev"><img src="https://avatars.githubusercontent.com/u/23692104?v=4" alt="Nx" height="32"></a> <a href="https://herocoders.com"><img src="https://avatars.githubusercontent.com/u/37549774?v=4" alt="HeroCoders" height="32"></a> <a href="https://usenextbase.com"><img src="https://avatars.githubusercontent.com/u/145838380?v=4" alt="Nextbase Starter Kit" height="32"></a></p>
|
303
303
|
<!--sponsorsend-->
|
304
304
|
|
305
305
|
<!--techsponsorsstart-->
|
@@ -5,7 +5,7 @@
|
|
5
5
|
"use strict";
|
6
6
|
|
7
7
|
const chalk = require("chalk"),
|
8
|
-
|
8
|
+
util = require("node:util"),
|
9
9
|
table = require("text-table");
|
10
10
|
|
11
11
|
//------------------------------------------------------------------------------
|
@@ -72,7 +72,7 @@ module.exports = function(results) {
|
|
72
72
|
{
|
73
73
|
align: ["", "r", "l"],
|
74
74
|
stringLength(str) {
|
75
|
-
return
|
75
|
+
return util.stripVTControlCharacters(str).length;
|
76
76
|
}
|
77
77
|
}
|
78
78
|
).split("\n").map(el => el.replace(/(\d+)\s+(\d+)/u, (m, p1, p2) => chalk.dim(`${p1}:${p2}`))).join("\n")}\n\n`;
|
package/lib/cli.js
CHANGED
@@ -348,14 +348,9 @@ const cli = {
|
|
348
348
|
// find the config file
|
349
349
|
const {
|
350
350
|
configFilePath,
|
351
|
-
basePath
|
352
|
-
error
|
351
|
+
basePath
|
353
352
|
} = await locateConfigFileToUse({ cwd: process.cwd(), configFile }, hasUnstableTSConfigFlag);
|
354
353
|
|
355
|
-
if (error) {
|
356
|
-
throw error;
|
357
|
-
}
|
358
|
-
|
359
354
|
return ["--config", configFilePath, "--basePath", basePath];
|
360
355
|
},
|
361
356
|
|