Skip to content

Commit 9406d2b

Browse files
authored
fix(linter): respect the --quiet option when running with --fix (#31403)
## Current Behavior `nx run lint --quiet --fix` doesn't respect `--quiet` and fixes all issues, even silenced ones. This is different from how `eslint --quiet --fix` behaves. ## Expected Behavior `nx run lint --quiet --fix` should only fix issues that aren't silenced by `--quiet`, like `eslint` does ## Related Issue(s) Fixes #31401
1 parent 5784058 commit 9406d2b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

packages/eslint/src/executors/lint/lint.impl.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,15 +170,15 @@ Please see https://nx.dev/recipes/tips-n-tricks/eslint for full guidance on how
170170
);
171171
}
172172

173-
// output fixes to disk, if applicable based on the options
174-
await ESLint.outputFixes(lintResults);
175-
176173
// if quiet, only show errors
177174
if (normalizedOptions.quiet) {
178175
console.debug('Quiet mode enabled - filtering out warnings\n');
179176
lintResults = ESLint.getErrorResults(lintResults);
180177
}
181178

179+
// output fixes to disk, if applicable based on the options
180+
await ESLint.outputFixes(lintResults);
181+
182182
const formatter = await eslint.loadFormatter(normalizedOptions.format);
183183

184184
const formattedResults = await formatter.format(lintResults);

0 commit comments

Comments
 (0)