Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(linter): ensure eslint fixes are stored before results are filtered #9348

Merged
merged 1 commit into from Mar 16, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/linter/src/executors/eslint/lint.impl.ts
Expand Up @@ -99,6 +99,9 @@ Please see https://nx.dev/guides/eslint for full guidance on how to resolve this
);
}

// output fixes to disk, if applicable based on the options
await projectESLint.ESLint.outputFixes(lintResults);

// if quiet, only show errors
if (options.quiet) {
console.debug('Quiet mode enabled - filtering out warnings\n');
Expand All @@ -110,9 +113,6 @@ Please see https://nx.dev/guides/eslint for full guidance on how to resolve this
let totalErrors = 0;
let totalWarnings = 0;

// output fixes to disk, if applicable based on the options
await projectESLint.ESLint.outputFixes(lintResults);

for (const result of lintResults) {
if (result.errorCount || result.warningCount) {
totalErrors += result.errorCount;
Expand Down