@angular-eslint/builder 20.7.1-alpha.0 → 21.0.1-alpha.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.
@@ -1 +1 @@
1
- {"version":3,"file":"lint.impl.d.ts","sourceRoot":"","sources":["../src/lint.impl.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;;AAMvC,wBA2OE"}
1
+ {"version":3,"file":"lint.impl.d.ts","sourceRoot":"","sources":["../src/lint.impl.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;;AAMvC,wBAuOE"}
package/dist/lint.impl.js CHANGED
@@ -88,25 +88,24 @@ For full guidance on how to resolve this issue, please see https://github.com/an
88
88
  let totalWarnings = 0;
89
89
  const reportOnlyErrors = options.quiet;
90
90
  const maxWarnings = options.maxWarnings;
91
- /**
92
- * Depending on user configuration we may not want to report on all the
93
- * results, so we need to adjust them before formatting.
94
- */
95
- const finalLintResults = lintResults
96
- .map((result) => {
91
+ // Calculate totals for all results
92
+ for (const result of lintResults) {
97
93
  totalErrors += result.errorCount;
98
94
  totalWarnings += result.warningCount;
99
- if (result.errorCount || (result.warningCount && !reportOnlyErrors)) {
100
- if (reportOnlyErrors) {
101
- // Collect only errors (Linter.Severity === 2)
102
- result.messages = result.messages.filter(({ severity }) => severity === 2);
103
- }
104
- return result;
105
- }
106
- return null;
107
- })
108
- // Filter out the null values
109
- .filter(Boolean);
95
+ }
96
+ /**
97
+ * Pass all lint results to the formatter, including files with no issues.
98
+ * This ensures formatters like "ratchet" that need complete file information work correctly.
99
+ * If quiet mode is enabled, we still filter messages but preserve all file results.
100
+ */
101
+ let finalLintResults = lintResults;
102
+ if (reportOnlyErrors) {
103
+ // In quiet mode, filter messages but keep all file results
104
+ finalLintResults = lintResults.map((result) => ({
105
+ ...result,
106
+ messages: result.messages.filter(({ severity }) => severity === 2),
107
+ }));
108
+ }
110
109
  const hasWarningsToPrint = totalWarnings > 0 && !reportOnlyErrors;
111
110
  const hasErrorsToPrint = totalErrors > 0;
112
111
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular-eslint/builder",
3
- "version": "20.7.1-alpha.0",
3
+ "version": "21.0.1-alpha.0",
4
4
  "description": "Angular CLI builder for ESLint",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -19,8 +19,8 @@
19
19
  "builders.json"
20
20
  ],
21
21
  "dependencies": {
22
- "@angular-devkit/architect": ">= 0.2000.0 < 0.2100.0",
23
- "@angular-devkit/core": ">= 20.0.0 < 21.0.0"
22
+ "@angular-devkit/architect": ">= 0.2100.0 < 0.2200.0",
23
+ "@angular-devkit/core": ">= 21.0.0 < 22.0.0"
24
24
  },
25
25
  "peerDependencies": {
26
26
  "eslint": "^8.57.0 || ^9.0.0",