@angular-eslint/builder 20.2.0 → 20.2.1-alpha.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/dist/schema.json
CHANGED
|
@@ -120,6 +120,13 @@
|
|
|
120
120
|
"type": "string",
|
|
121
121
|
"enum": ["off", "warn", "error"],
|
|
122
122
|
"description": "The equivalent of the `--report-unused-disable-directives` flag on the ESLint CLI."
|
|
123
|
+
},
|
|
124
|
+
"concurrency": {
|
|
125
|
+
"oneOf": [
|
|
126
|
+
{ "type": "string", "enum": ["auto", "off"] },
|
|
127
|
+
{ "type": "number" }
|
|
128
|
+
],
|
|
129
|
+
"description": "The equivalent of the `--concurrency` flag on the ESLint CLI."
|
|
123
130
|
}
|
|
124
131
|
},
|
|
125
132
|
"additionalProperties": false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eslint-utils.d.ts","sourceRoot":"","sources":["../../src/utils/eslint-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACrC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAExC,eAAO,MAAM,wBAAwB,UAOpC,CAAC;
|
|
1
|
+
{"version":3,"file":"eslint-utils.d.ts","sourceRoot":"","sources":["../../src/utils/eslint-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACrC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAExC,eAAO,MAAM,wBAAwB,UAOpC,CAAC;AAsCF,wBAAsB,2BAA2B,CAC/C,gBAAgB,EAAE,MAAM,GAAG,SAAS,EACpC,OAAO,EAAE,MAAM,EACf,aAAa,UAAQ;;;GAqGtB"}
|
|
@@ -28,6 +28,17 @@ async function resolveESLintClass(useFlatConfig = false) {
|
|
|
28
28
|
throw new Error('Unable to find ESLint. Ensure ESLint is installed.');
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
|
+
function validateConcurrency(concurrency) {
|
|
32
|
+
if (concurrency === 'auto' || concurrency === 'off') {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
if (typeof concurrency === 'number' &&
|
|
36
|
+
Number.isInteger(concurrency) &&
|
|
37
|
+
concurrency > 0) {
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
throw new Error('The --concurrency option must be auto, off or a positive integer');
|
|
41
|
+
}
|
|
31
42
|
async function resolveAndInstantiateESLint(eslintConfigPath, options, useFlatConfig = false) {
|
|
32
43
|
if (options.stats && !useFlatConfig) {
|
|
33
44
|
throw new Error('The --stats option requires ESLint Flat Config');
|
|
@@ -55,6 +66,11 @@ async function resolveAndInstantiateESLint(eslintConfigPath, options, useFlatCon
|
|
|
55
66
|
*/
|
|
56
67
|
errorOnUnmatchedPattern: false,
|
|
57
68
|
};
|
|
69
|
+
const concurrency = options.concurrency;
|
|
70
|
+
if (concurrency != null) {
|
|
71
|
+
validateConcurrency(concurrency);
|
|
72
|
+
eslintOptions.concurrency = concurrency;
|
|
73
|
+
}
|
|
58
74
|
if (useFlatConfig) {
|
|
59
75
|
eslintOptions.stats = !!options.stats;
|
|
60
76
|
if (typeof options.useEslintrc !== 'undefined') {
|