Skip to content

Commit

Permalink
fix(linter): ensure eslint fixes are stored before results are filter…
Browse files Browse the repository at this point in the history
…ed (#9348)
  • Loading branch information
meeroslav committed Mar 16, 2022
1 parent 2d08719 commit 996e2de
Showing 1 changed file with 3 additions and 3 deletions.
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

0 comments on commit 996e2de

Please sign in to comment.