eslint 9.9.0 → 9.9.1
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 +42 -37
- package/lib/eslint/eslint.js +24 -11
- package/lib/linter/linter.js +12 -45
- package/lib/services/parser-service.js +65 -0
- package/package.json +17 -18
package/README.md
CHANGED
@@ -21,25 +21,26 @@
|
|
21
21
|
|
22
22
|
ESLint is a tool for identifying and reporting on patterns found in ECMAScript/JavaScript code. In many ways, it is similar to JSLint and JSHint with a few exceptions:
|
23
23
|
|
24
|
-
* ESLint uses [Espree](https://github.com/eslint/espree) for JavaScript parsing.
|
24
|
+
* ESLint uses [Espree](https://github.com/eslint/js/tree/main/packages/espree) for JavaScript parsing.
|
25
25
|
* ESLint uses an AST to evaluate patterns in code.
|
26
26
|
* ESLint is completely pluggable, every single rule is a plugin and you can add more at runtime.
|
27
27
|
|
28
28
|
## Table of Contents
|
29
29
|
|
30
30
|
1. [Installation and Usage](#installation-and-usage)
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
31
|
+
1. [Configuration](#configuration)
|
32
|
+
1. [Version Support](#version-support)
|
33
|
+
1. [Code of Conduct](#code-of-conduct)
|
34
|
+
1. [Filing Issues](#filing-issues)
|
35
|
+
1. [Frequently Asked Questions](#frequently-asked-questions)
|
36
|
+
1. [Releases](#releases)
|
37
|
+
1. [Security Policy](#security-policy)
|
38
|
+
1. [Semantic Versioning Policy](#semantic-versioning-policy)
|
39
|
+
1. [Stylistic Rule Updates](#stylistic-rule-updates)
|
40
|
+
1. [License](#license)
|
41
|
+
1. [Team](#team)
|
42
|
+
1. [Sponsors](#sponsors)
|
43
|
+
1. [Technology Sponsors](#technology-sponsors) <!-- markdownlint-disable-line MD051 -->
|
43
44
|
|
44
45
|
## Installation and Usage
|
45
46
|
|
@@ -54,19 +55,26 @@ npm init @eslint/config@latest
|
|
54
55
|
After that, you can run ESLint on any file or directory like this:
|
55
56
|
|
56
57
|
```shell
|
57
|
-
|
58
|
+
npx eslint yourfile.js
|
58
59
|
```
|
59
60
|
|
60
61
|
## Configuration
|
61
62
|
|
62
|
-
|
63
|
+
You can configure rules in your `eslint.config.js` files as in this example:
|
63
64
|
|
64
65
|
```js
|
65
|
-
|
66
|
-
|
66
|
+
export default [
|
67
|
+
{
|
68
|
+
files: ["**/*.js", "**/*.cjs", "**/*.mjs"],
|
69
|
+
rules: {
|
70
|
+
"prefer-const": "warn",
|
71
|
+
"no-constant-binary-expression": "error"
|
72
|
+
}
|
73
|
+
}
|
74
|
+
];
|
67
75
|
```
|
68
76
|
|
69
|
-
The names `"
|
77
|
+
The names `"prefer-const"` and `"no-constant-binary-expression"` are the names of [rules](https://eslint.org/docs/rules) in ESLint. The first value is the error level of the rule and can be one of these values:
|
70
78
|
|
71
79
|
* `"off"` or `0` - turn the rule off
|
72
80
|
* `"warn"` or `1` - turn the rule on as a warning (doesn't affect exit code)
|
@@ -74,9 +82,17 @@ The names `"semi"` and `"quotes"` are the names of [rules](https://eslint.org/do
|
|
74
82
|
|
75
83
|
The three error levels allow you fine-grained control over how ESLint applies rules (for more configuration options and details, see the [configuration docs](https://eslint.org/docs/latest/use/configure)).
|
76
84
|
|
85
|
+
## Version Support
|
86
|
+
|
87
|
+
The ESLint team provides ongoing support for the current version and six months of limited support for the previous version. Limited support includes critical bug fixes, security issues, and compatibility issues only.
|
88
|
+
|
89
|
+
ESLint offers commercial support for both current and previous versions through our partners, [Tidelift][tidelift] and [HeroDevs][herodevs].
|
90
|
+
|
91
|
+
See [Version Support](https://eslint.org/version-support) for more details.
|
92
|
+
|
77
93
|
## Code of Conduct
|
78
94
|
|
79
|
-
ESLint adheres to the [
|
95
|
+
ESLint adheres to the [OpenJS Foundation Code of Conduct](https://eslint.org/conduct).
|
80
96
|
|
81
97
|
## Filing Issues
|
82
98
|
|
@@ -89,28 +105,14 @@ Before filing an issue, please be sure to read the guidelines for what you're re
|
|
89
105
|
|
90
106
|
## Frequently Asked Questions
|
91
107
|
|
92
|
-
###
|
93
|
-
|
94
|
-
Yes. [JSCS has reached end of life](https://eslint.org/blog/2016/07/jscs-end-of-life) and is no longer supported.
|
95
|
-
|
96
|
-
We have prepared a [migration guide](https://eslint.org/docs/latest/use/migrating-from-jscs) to help you convert your JSCS settings to an ESLint configuration.
|
108
|
+
### Does ESLint support JSX?
|
97
109
|
|
98
|
-
|
110
|
+
Yes, ESLint natively supports parsing JSX syntax (this must be enabled in [configuration](https://eslint.org/docs/latest/use/configure)). Please note that supporting JSX syntax *is not* the same as supporting React. React applies specific semantics to JSX syntax that ESLint doesn't recognize. We recommend using [eslint-plugin-react](https://www.npmjs.com/package/eslint-plugin-react) if you are using React and want React semantics.
|
99
111
|
|
100
112
|
### Does Prettier replace ESLint?
|
101
113
|
|
102
114
|
No, ESLint and Prettier have different jobs: ESLint is a linter (looking for problematic patterns) and Prettier is a code formatter. Using both tools is common, refer to [Prettier's documentation](https://prettier.io/docs/en/install#eslint-and-other-linters) to learn how to configure them to work well with each other.
|
103
115
|
|
104
|
-
### Why can't ESLint find my plugins?
|
105
|
-
|
106
|
-
* Make sure your plugins (and ESLint) are both in your project's `package.json` as devDependencies (or dependencies, if your project uses ESLint at runtime).
|
107
|
-
* Make sure you have run `npm install` and all your dependencies are installed.
|
108
|
-
* Make sure your plugins' peerDependencies have been installed as well. You can use `npm view eslint-plugin-myplugin peerDependencies` to see what peer dependencies `eslint-plugin-myplugin` has.
|
109
|
-
|
110
|
-
### Does ESLint support JSX?
|
111
|
-
|
112
|
-
Yes, ESLint natively supports parsing JSX syntax (this must be enabled in [configuration](https://eslint.org/docs/latest/use/configure)). Please note that supporting JSX syntax *is not* the same as supporting React. React applies specific semantics to JSX syntax that ESLint doesn't recognize. We recommend using [eslint-plugin-react](https://www.npmjs.com/package/eslint-plugin-react) if you are using React and want React semantics.
|
113
|
-
|
114
116
|
### What ECMAScript versions does ESLint support?
|
115
117
|
|
116
118
|
ESLint has full support for ECMAScript 3, 5, and every year from 2015 up until the most recent stage 4 specification (the default). You can set your desired ECMAScript syntax and other settings (like global variables) through [configuration](https://eslint.org/docs/latest/use/configure).
|
@@ -295,7 +297,7 @@ The following companies, organizations, and individuals support ESLint's ongoing
|
|
295
297
|
<!--sponsorsstart-->
|
296
298
|
<h3>Platinum Sponsors</h3>
|
297
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>
|
298
|
-
<p><a href="#"><img src="https://images.opencollective.com/guest-bf377e88/avatar.png" alt="Eli Schleifer" height="96"></a></p><h3>Silver Sponsors</h3>
|
300
|
+
<p><a href="#"><img src="https://images.opencollective.com/guest-bf377e88/avatar.png" alt="Eli Schleifer" height="96"></a> <a href="https://opensource.siemens.com"><img src="https://avatars.githubusercontent.com/u/624020?v=4" alt="Siemens" height="96"></a></p><h3>Silver Sponsors</h3>
|
299
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>
|
300
302
|
<p><a href="https://www.notion.so"><img src="https://images.opencollective.com/notion/bf3b117/logo.png" alt="notion" 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.ignitionapp.com"><img src="https://avatars.githubusercontent.com/u/5753491?v=4" alt="Ignition" 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>
|
301
303
|
<!--sponsorsend-->
|
@@ -303,4 +305,7 @@ The following companies, organizations, and individuals support ESLint's ongoing
|
|
303
305
|
<!--techsponsorsstart-->
|
304
306
|
<h2>Technology Sponsors</h2>
|
305
307
|
<p><a href="https://netlify.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/netlify-icon.svg" alt="Netlify" height="32"></a> <a href="https://algolia.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/algolia-icon.svg" alt="Algolia" height="32"></a> <a href="https://1password.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/1password-icon.svg" alt="1Password" height="32"></a></p>
|
306
|
-
<!--techsponsorsend-->
|
308
|
+
<!--techsponsorsend-->
|
309
|
+
|
310
|
+
[tidelift]: https://tidelift.com/funding/github/npm/eslint
|
311
|
+
[herodevs]: https://www.herodevs.com/support/eslint-nes?utm_source=ESLintWebsite&utm_medium=ESLintWebsite&utm_campaign=ESLintNES&utm_id=ESLintNES
|
package/lib/eslint/eslint.js
CHANGED
@@ -646,6 +646,23 @@ function createExtraneousResultsError() {
|
|
646
646
|
return new TypeError("Results object was not created from this ESLint instance.");
|
647
647
|
}
|
648
648
|
|
649
|
+
/**
|
650
|
+
* Creates a fixer function based on the provided fix, fixTypesSet, and config.
|
651
|
+
* @param {Function|boolean} fix The original fix option.
|
652
|
+
* @param {Set<string>} fixTypesSet A set of fix types to filter messages for fixing.
|
653
|
+
* @param {FlatConfig} config The config for the file that generated the message.
|
654
|
+
* @returns {Function|boolean} The fixer function or the original fix value.
|
655
|
+
*/
|
656
|
+
function getFixerForFixTypes(fix, fixTypesSet, config) {
|
657
|
+
if (!fix || !fixTypesSet) {
|
658
|
+
return fix;
|
659
|
+
}
|
660
|
+
|
661
|
+
const originalFix = (typeof fix === "function") ? fix : () => true;
|
662
|
+
|
663
|
+
return message => shouldMessageBeFixed(message, config, fixTypesSet) && originalFix(message);
|
664
|
+
}
|
665
|
+
|
649
666
|
//-----------------------------------------------------------------------------
|
650
667
|
// Main API
|
651
668
|
//-----------------------------------------------------------------------------
|
@@ -994,16 +1011,7 @@ class ESLint {
|
|
994
1011
|
|
995
1012
|
|
996
1013
|
// set up fixer for fixTypes if necessary
|
997
|
-
|
998
|
-
|
999
|
-
if (fix && fixTypesSet) {
|
1000
|
-
|
1001
|
-
// save original value of options.fix in case it's a function
|
1002
|
-
const originalFix = (typeof fix === "function")
|
1003
|
-
? fix : () => true;
|
1004
|
-
|
1005
|
-
fixer = message => shouldMessageBeFixed(message, config, fixTypesSet) && originalFix(message);
|
1006
|
-
}
|
1014
|
+
const fixer = getFixerForFixTypes(fix, fixTypesSet, config);
|
1007
1015
|
|
1008
1016
|
return retrier.retry(() => fs.readFile(filePath, { encoding: "utf8", signal: controller.signal })
|
1009
1017
|
.then(text => {
|
@@ -1108,13 +1116,18 @@ class ESLint {
|
|
1108
1116
|
allowInlineConfig,
|
1109
1117
|
cwd,
|
1110
1118
|
fix,
|
1119
|
+
fixTypes,
|
1111
1120
|
warnIgnored: constructorWarnIgnored,
|
1112
1121
|
ruleFilter,
|
1113
1122
|
stats
|
1114
1123
|
} = eslintOptions;
|
1115
1124
|
const results = [];
|
1116
1125
|
const startTime = Date.now();
|
1126
|
+
const fixTypesSet = fixTypes ? new Set(fixTypes) : null;
|
1117
1127
|
const resolvedFilename = path.resolve(cwd, filePath || "__placeholder__.js");
|
1128
|
+
const config = configs.getConfig(resolvedFilename);
|
1129
|
+
|
1130
|
+
const fixer = getFixerForFixTypes(fix, fixTypesSet, config);
|
1118
1131
|
|
1119
1132
|
// Clear the last used config arrays.
|
1120
1133
|
if (resolvedFilename && await this.isPathIgnored(resolvedFilename)) {
|
@@ -1133,7 +1146,7 @@ class ESLint {
|
|
1133
1146
|
filePath: resolvedFilename.endsWith("__placeholder__.js") ? "<text>" : resolvedFilename,
|
1134
1147
|
configs,
|
1135
1148
|
cwd,
|
1136
|
-
fix,
|
1149
|
+
fix: fixer,
|
1137
1150
|
allowInlineConfig,
|
1138
1151
|
ruleFilter,
|
1139
1152
|
stats,
|
package/lib/linter/linter.js
CHANGED
@@ -55,6 +55,7 @@ const DEFAULT_ERROR_LOC = { start: { line: 1, column: 0 }, end: { line: 1, colum
|
|
55
55
|
const parserSymbol = Symbol.for("eslint.RuleTester.parser");
|
56
56
|
const { LATEST_ECMA_VERSION } = require("../../conf/ecma-version");
|
57
57
|
const { VFile } = require("./vfile");
|
58
|
+
const { ParserService } = require("../services/parser-service");
|
58
59
|
const STEP_KIND_VISIT = 1;
|
59
60
|
const STEP_KIND_CALL = 2;
|
60
61
|
|
@@ -922,43 +923,6 @@ function analyzeScope(ast, languageOptions, visitorKeys) {
|
|
922
923
|
});
|
923
924
|
}
|
924
925
|
|
925
|
-
/**
|
926
|
-
* Parses file into an AST. Moved out here because the try-catch prevents
|
927
|
-
* optimization of functions, so it's best to keep the try-catch as isolated
|
928
|
-
* as possible
|
929
|
-
* @param {VFile} file The file to parse.
|
930
|
-
* @param {Language} language The language to use.
|
931
|
-
* @param {LanguageOptions} languageOptions Options to pass to the parser
|
932
|
-
* @returns {{success: false, error: LintMessage}|{success: true, sourceCode: SourceCode}}
|
933
|
-
* An object containing the AST and parser services if parsing was successful, or the error if parsing failed
|
934
|
-
* @private
|
935
|
-
*/
|
936
|
-
function parse(file, language, languageOptions) {
|
937
|
-
|
938
|
-
const result = language.parse(file, { languageOptions });
|
939
|
-
|
940
|
-
if (result.ok) {
|
941
|
-
return {
|
942
|
-
success: true,
|
943
|
-
sourceCode: language.createSourceCode(file, result, { languageOptions })
|
944
|
-
};
|
945
|
-
}
|
946
|
-
|
947
|
-
// if we made it to here there was an error
|
948
|
-
return {
|
949
|
-
success: false,
|
950
|
-
errors: result.errors.map(error => ({
|
951
|
-
ruleId: null,
|
952
|
-
nodeType: null,
|
953
|
-
fatal: true,
|
954
|
-
severity: 2,
|
955
|
-
message: `Parsing error: ${error.message}`,
|
956
|
-
line: error.line,
|
957
|
-
column: error.column
|
958
|
-
}))
|
959
|
-
};
|
960
|
-
}
|
961
|
-
|
962
926
|
/**
|
963
927
|
* Runs a rule, and gets its listeners
|
964
928
|
* @param {Rule} rule A rule object
|
@@ -1407,10 +1371,13 @@ class Linter {
|
|
1407
1371
|
t = startTime();
|
1408
1372
|
}
|
1409
1373
|
|
1410
|
-
const
|
1374
|
+
const parserService = new ParserService();
|
1375
|
+
const parseResult = parserService.parseSync(
|
1411
1376
|
file,
|
1412
|
-
|
1413
|
-
|
1377
|
+
{
|
1378
|
+
language: jslang,
|
1379
|
+
languageOptions
|
1380
|
+
}
|
1414
1381
|
);
|
1415
1382
|
|
1416
1383
|
if (options.stats) {
|
@@ -1420,7 +1387,7 @@ class Linter {
|
|
1420
1387
|
storeTime(time, timeOpts, slots);
|
1421
1388
|
}
|
1422
1389
|
|
1423
|
-
if (!parseResult.
|
1390
|
+
if (!parseResult.ok) {
|
1424
1391
|
return parseResult.errors;
|
1425
1392
|
}
|
1426
1393
|
|
@@ -1712,10 +1679,10 @@ class Linter {
|
|
1712
1679
|
t = startTime();
|
1713
1680
|
}
|
1714
1681
|
|
1715
|
-
const
|
1682
|
+
const parserService = new ParserService();
|
1683
|
+
const parseResult = parserService.parseSync(
|
1716
1684
|
file,
|
1717
|
-
config
|
1718
|
-
languageOptions
|
1685
|
+
config
|
1719
1686
|
);
|
1720
1687
|
|
1721
1688
|
if (options.stats) {
|
@@ -1724,7 +1691,7 @@ class Linter {
|
|
1724
1691
|
storeTime(time, { type: "parse" }, slots);
|
1725
1692
|
}
|
1726
1693
|
|
1727
|
-
if (!parseResult.
|
1694
|
+
if (!parseResult.ok) {
|
1728
1695
|
return parseResult.errors;
|
1729
1696
|
}
|
1730
1697
|
|
@@ -0,0 +1,65 @@
|
|
1
|
+
/**
|
2
|
+
* @fileoverview ESLint Parser
|
3
|
+
* @author Nicholas C. Zakas
|
4
|
+
*/
|
5
|
+
/* eslint class-methods-use-this: off -- Anticipate future constructor arguments. */
|
6
|
+
|
7
|
+
"use strict";
|
8
|
+
|
9
|
+
//-----------------------------------------------------------------------------
|
10
|
+
// Types
|
11
|
+
//-----------------------------------------------------------------------------
|
12
|
+
|
13
|
+
/** @typedef {import("../linter/vfile.js").VFile} VFile */
|
14
|
+
/** @typedef {import("@eslint/core").Language} Language */
|
15
|
+
/** @typedef {import("@eslint/core").LanguageOptions} LanguageOptions */
|
16
|
+
|
17
|
+
//-----------------------------------------------------------------------------
|
18
|
+
// Exports
|
19
|
+
//-----------------------------------------------------------------------------
|
20
|
+
|
21
|
+
/**
|
22
|
+
* The parser for ESLint.
|
23
|
+
*/
|
24
|
+
class ParserService {
|
25
|
+
|
26
|
+
/**
|
27
|
+
* Parses the given file synchronously.
|
28
|
+
* @param {VFile} file The file to parse.
|
29
|
+
* @param {{language:Language,languageOptions:LanguageOptions}} config The configuration to use.
|
30
|
+
* @returns {Object} An object with the parsed source code or errors.
|
31
|
+
* @throws {Error} If the parser returns a promise.
|
32
|
+
*/
|
33
|
+
parseSync(file, config) {
|
34
|
+
|
35
|
+
const { language, languageOptions } = config;
|
36
|
+
const result = language.parse(file, { languageOptions });
|
37
|
+
|
38
|
+
if (typeof result.then === "function") {
|
39
|
+
throw new Error("Unsupported: Language parser returned a promise.");
|
40
|
+
}
|
41
|
+
|
42
|
+
if (result.ok) {
|
43
|
+
return {
|
44
|
+
ok: true,
|
45
|
+
sourceCode: language.createSourceCode(file, result, { languageOptions })
|
46
|
+
};
|
47
|
+
}
|
48
|
+
|
49
|
+
// if we made it to here there was an error
|
50
|
+
return {
|
51
|
+
ok: false,
|
52
|
+
errors: result.errors.map(error => ({
|
53
|
+
ruleId: null,
|
54
|
+
nodeType: null,
|
55
|
+
fatal: true,
|
56
|
+
severity: 2,
|
57
|
+
message: `Parsing error: ${error.message}`,
|
58
|
+
line: error.line,
|
59
|
+
column: error.column
|
60
|
+
}))
|
61
|
+
};
|
62
|
+
}
|
63
|
+
}
|
64
|
+
|
65
|
+
module.exports = { ParserService };
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "eslint",
|
3
|
-
"version": "9.9.
|
3
|
+
"version": "9.9.1",
|
4
4
|
"author": "Nicholas C. Zakas <nicholas+npm@nczconsulting.com>",
|
5
5
|
"description": "An AST-based pattern checker for JavaScript.",
|
6
6
|
"bin": {
|
@@ -18,12 +18,12 @@
|
|
18
18
|
"build:webpack": "node Makefile.js webpack",
|
19
19
|
"build:readme": "node tools/update-readme.js",
|
20
20
|
"build:rules-index": "node Makefile.js generateRuleIndexPage",
|
21
|
-
"lint": "
|
22
|
-
"lint:docs:js": "
|
21
|
+
"lint": "trunk check --no-fix --ignore=docs/**/*.js -a --filter=eslint && trunk check --no-fix --ignore=docs/**/*.js",
|
22
|
+
"lint:docs:js": "trunk check --no-fix --ignore=** --ignore=!docs/**/*.js -a --filter=eslint && trunk check --no-fix --ignore=** --ignore=!docs/**/*.js",
|
23
23
|
"lint:docs:rule-examples": "node Makefile.js checkRuleExamples",
|
24
|
-
"lint:fix": "node Makefile.js lint -- fix",
|
25
|
-
"lint:fix:docs:js": "node Makefile.js lintDocsJS -- fix",
|
26
24
|
"lint:unused": "knip",
|
25
|
+
"lint:fix": "trunk check -y --ignore=docs/**/*.js -a --filter=eslint && trunk check -y --ignore=docs/**/*.js",
|
26
|
+
"lint:fix:docs:js": "trunk check -y --ignore=** --ignore=!docs/**/*.js -a --flter=eslint && trunk check -y --ignore=** --ignore=!docs/**/*.js",
|
27
27
|
"release:generate:alpha": "node Makefile.js generatePrerelease -- alpha",
|
28
28
|
"release:generate:beta": "node Makefile.js generatePrerelease -- beta",
|
29
29
|
"release:generate:latest": "node Makefile.js generateRelease",
|
@@ -40,8 +40,8 @@
|
|
40
40
|
"pre-commit": "lint-staged"
|
41
41
|
},
|
42
42
|
"lint-staged": {
|
43
|
-
"*.js": "
|
44
|
-
"*.md": "
|
43
|
+
"*.js": "trunk check --fix --filter=eslint",
|
44
|
+
"*.md": "trunk check --fix --filter=markdownlint",
|
45
45
|
"lib/rules/*.js": [
|
46
46
|
"node tools/update-eslint-all.js",
|
47
47
|
"git add packages/js/src/configs/eslint-all.js"
|
@@ -51,7 +51,7 @@
|
|
51
51
|
"node tools/fetch-docs-links.js",
|
52
52
|
"git add docs/src/_data/further_reading_links.json"
|
53
53
|
],
|
54
|
-
"docs/**/*.svg": "
|
54
|
+
"docs/**/*.svg": "trunk check --fix --filter=svgo"
|
55
55
|
},
|
56
56
|
"files": [
|
57
57
|
"LICENSE",
|
@@ -68,9 +68,9 @@
|
|
68
68
|
"dependencies": {
|
69
69
|
"@eslint-community/eslint-utils": "^4.2.0",
|
70
70
|
"@eslint-community/regexpp": "^4.11.0",
|
71
|
-
"@eslint/config-array": "^0.
|
71
|
+
"@eslint/config-array": "^0.18.0",
|
72
72
|
"@eslint/eslintrc": "^3.1.0",
|
73
|
-
"@eslint/js": "9.9.
|
73
|
+
"@eslint/js": "9.9.1",
|
74
74
|
"@humanwhocodes/module-importer": "^1.0.1",
|
75
75
|
"@humanwhocodes/retry": "^0.3.0",
|
76
76
|
"@nodelib/fs.walk": "^1.2.8",
|
@@ -104,14 +104,15 @@
|
|
104
104
|
"devDependencies": {
|
105
105
|
"@babel/core": "^7.4.3",
|
106
106
|
"@babel/preset-env": "^7.4.3",
|
107
|
-
"@eslint/core": "^0.
|
107
|
+
"@eslint/core": "^0.4.0",
|
108
108
|
"@eslint/json": "^0.3.0",
|
109
|
+
"@trunkio/launcher": "^1.3.0",
|
109
110
|
"@types/estree": "^1.0.5",
|
110
111
|
"@types/node": "^20.11.5",
|
111
|
-
"@wdio/browser-runner": "^
|
112
|
-
"@wdio/cli": "^
|
113
|
-
"@wdio/concise-reporter": "^
|
114
|
-
"@wdio/mocha-framework": "^
|
112
|
+
"@wdio/browser-runner": "^9.0.5",
|
113
|
+
"@wdio/cli": "^9.0.5",
|
114
|
+
"@wdio/concise-reporter": "^9.0.4",
|
115
|
+
"@wdio/mocha-framework": "^9.0.5",
|
115
116
|
"babel-loader": "^8.0.5",
|
116
117
|
"c8": "^7.12.0",
|
117
118
|
"chai": "^4.0.1",
|
@@ -122,6 +123,7 @@
|
|
122
123
|
"eslint": "file:.",
|
123
124
|
"eslint-config-eslint": "file:packages/eslint-config-eslint",
|
124
125
|
"eslint-plugin-eslint-plugin": "^6.0.0",
|
126
|
+
"eslint-plugin-yml": "^1.14.0",
|
125
127
|
"eslint-release": "^3.2.2",
|
126
128
|
"eslint-rule-composer": "^0.3.0",
|
127
129
|
"eslump": "^3.0.0",
|
@@ -133,14 +135,11 @@
|
|
133
135
|
"got": "^11.8.3",
|
134
136
|
"gray-matter": "^4.0.3",
|
135
137
|
"jiti": "^1.21.6",
|
136
|
-
"js-yaml": "^4.1.0",
|
137
138
|
"knip": "^5.21.0",
|
138
139
|
"lint-staged": "^11.0.0",
|
139
140
|
"load-perf": "^0.2.0",
|
140
141
|
"markdown-it": "^12.2.0",
|
141
142
|
"markdown-it-container": "^3.0.0",
|
142
|
-
"markdownlint": "^0.34.0",
|
143
|
-
"markdownlint-cli": "^0.41.0",
|
144
143
|
"marked": "^4.0.8",
|
145
144
|
"metascraper": "^5.25.7",
|
146
145
|
"metascraper-description": "^5.25.7",
|