@nx/eslint 22.4.0-canary.20251219-137ab45 → 22.4.0-canary.20251223-d959d70
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/eslint",
|
|
3
|
-
"version": "22.4.0-canary.
|
|
3
|
+
"version": "22.4.0-canary.20251223-d959d70",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The ESLint plugin for Nx contains executors, generators and utilities used for linting JavaScript/TypeScript projects within an Nx workspace.",
|
|
6
6
|
"repository": {
|
|
@@ -35,14 +35,14 @@
|
|
|
35
35
|
"eslint": "^8.0.0 || ^9.0.0"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@nx/devkit": "22.4.0-canary.
|
|
39
|
-
"@nx/js": "22.4.0-canary.
|
|
38
|
+
"@nx/devkit": "22.4.0-canary.20251223-d959d70",
|
|
39
|
+
"@nx/js": "22.4.0-canary.20251223-d959d70",
|
|
40
40
|
"semver": "^7.6.3",
|
|
41
41
|
"tslib": "^2.3.0",
|
|
42
42
|
"typescript": "~5.9.2"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"nx": "22.4.0-canary.
|
|
45
|
+
"nx": "22.4.0-canary.20251223-d959d70"
|
|
46
46
|
},
|
|
47
47
|
"peerDependenciesMeta": {
|
|
48
48
|
"@zkochan/js-yaml": {
|
|
@@ -22,6 +22,9 @@ export interface Schema extends JsonObject {
|
|
|
22
22
|
reportUnusedDisableDirectives: Linter.StringSeverity | null;
|
|
23
23
|
printConfig?: string | null;
|
|
24
24
|
errorOnUnmatchedPattern?: boolean;
|
|
25
|
+
suppressAll?: boolean;
|
|
26
|
+
suppressRule?: string[];
|
|
27
|
+
suppressionsLocation?: string;
|
|
25
28
|
}
|
|
26
29
|
|
|
27
30
|
type Formatter =
|
|
@@ -142,6 +142,24 @@
|
|
|
142
142
|
"type": "boolean",
|
|
143
143
|
"description": "When set to false, equivalent of the `--no-error-on-unmatched-pattern` flag on the ESLint CLI.",
|
|
144
144
|
"default": true
|
|
145
|
+
},
|
|
146
|
+
"suppressAll": {
|
|
147
|
+
"type": "boolean",
|
|
148
|
+
"description": "Suppress all existing violations. This is equivalent to the `--suppress-all` flag on the ESLint CLI. Requires ESLint v9.24.0 or higher.",
|
|
149
|
+
"default": false
|
|
150
|
+
},
|
|
151
|
+
"suppressRule": {
|
|
152
|
+
"type": "array",
|
|
153
|
+
"description": "Suppress violations for specific rules. This is equivalent to the `--suppress-rule` flag on the ESLint CLI. Requires ESLint v9.24.0 or higher.",
|
|
154
|
+
"default": [],
|
|
155
|
+
"items": {
|
|
156
|
+
"type": "string"
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
"suppressionsLocation": {
|
|
160
|
+
"type": "string",
|
|
161
|
+
"description": "Specify the location of the suppressions file. This is equivalent to the `--suppressions-location` flag on the ESLint CLI. Defaults to 'eslint-suppressions.json' in the project root. Requires ESLint v9.24.0 or higher.",
|
|
162
|
+
"x-completion-type": "file"
|
|
145
163
|
}
|
|
146
164
|
},
|
|
147
165
|
"examplesFile": "../../../docs/eslint-examples.md"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eslint-utils.d.ts","sourceRoot":"","sources":["../../../../../../../packages/eslint/src/executors/lint/utility/eslint-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAIrC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAExC,wBAAsB,2BAA2B,CAC/C,gBAAgB,EAAE,MAAM,GAAG,SAAS,EACpC,OAAO,EAAE,MAAM,EACf,aAAa,UAAQ;;;
|
|
1
|
+
{"version":3,"file":"eslint-utils.d.ts","sourceRoot":"","sources":["../../../../../../../packages/eslint/src/executors/lint/utility/eslint-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAIrC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAExC,wBAAsB,2BAA2B,CAC/C,gBAAgB,EAAE,MAAM,GAAG,SAAS,EACpC,OAAO,EAAE,MAAM,EACf,aAAa,UAAQ;;;GAyHtB"}
|
|
@@ -13,7 +13,7 @@ async function resolveAndInstantiateESLint(eslintConfigPath, options, useFlatCon
|
|
|
13
13
|
const ESLint = await (0, resolve_eslint_class_1.resolveESLintClass)({
|
|
14
14
|
useFlatConfigOverrideVal: useFlatConfig,
|
|
15
15
|
});
|
|
16
|
-
// ruleFilter exist only in eslint 9+, remove this type when eslint 8 support dropped
|
|
16
|
+
// ruleFilter, suppressAll, suppressRule, suppressionsLocation exist only in eslint 9+, remove this type when eslint 8 support dropped
|
|
17
17
|
const eslintOptions = {
|
|
18
18
|
overrideConfigFile: eslintConfigPath,
|
|
19
19
|
fix: !!options.fix &&
|
|
@@ -64,6 +64,35 @@ async function resolveAndInstantiateESLint(eslintConfigPath, options, useFlatCon
|
|
|
64
64
|
if (options.quiet && (0, semver_1.gte)(ESLint.version, '9.0.0')) {
|
|
65
65
|
eslintOptions.ruleFilter = (rule) => rule.severity === 2;
|
|
66
66
|
}
|
|
67
|
+
// Handle bulk suppression options (ESLint v9.24.0+)
|
|
68
|
+
try {
|
|
69
|
+
if (ESLint.version && (0, semver_1.gte)(ESLint.version, '9.24.0')) {
|
|
70
|
+
if (options.suppressAll) {
|
|
71
|
+
eslintOptions.suppressAll = true;
|
|
72
|
+
}
|
|
73
|
+
if (options.suppressRule && options.suppressRule.length > 0) {
|
|
74
|
+
eslintOptions.suppressRule = options.suppressRule;
|
|
75
|
+
}
|
|
76
|
+
if (options.suppressionsLocation) {
|
|
77
|
+
eslintOptions.suppressionsLocation = options.suppressionsLocation;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
else if (options.suppressAll ||
|
|
81
|
+
(options.suppressRule && options.suppressRule.length > 0) ||
|
|
82
|
+
options.suppressionsLocation) {
|
|
83
|
+
throw new Error('Bulk suppression options (suppressAll, suppressRule, suppressionsLocation) require ESLint v9.24.0 or higher. Current version: ' +
|
|
84
|
+
(ESLint.version || 'unknown'));
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
catch (error) {
|
|
88
|
+
// If version checking fails (e.g., in tests), skip suppression options
|
|
89
|
+
if (options.suppressAll ||
|
|
90
|
+
(options.suppressRule && options.suppressRule.length > 0) ||
|
|
91
|
+
options.suppressionsLocation) {
|
|
92
|
+
// In test environment, just skip the suppression options
|
|
93
|
+
console.warn('Bulk suppression options skipped due to version check failure');
|
|
94
|
+
}
|
|
95
|
+
}
|
|
67
96
|
const eslint = new ESLint(eslintOptions);
|
|
68
97
|
return {
|
|
69
98
|
ESLint,
|