linting with --fix passes when it should not pass.
See original GitHub issueCurrent Behavior
Calling npx nx run-many --target=lint --quiet --skip-nx-cache --all --fix
success with linting failing without fixing.
Expected Behavior
Should or either fail or fix the issues.
Steps to Reproduce
Use Eslint and break some rule. I used @typescript-eslint/prefer-readonly
- Define a member that break the
readonly
rule - Call
npx nx run-many --target=lint --quiet --skip-nx-cache --all
and see how it fails. - Call
npx nx run-many --target=lint --quiet --skip-nx-cache --all --fix
, it passes.
PR: https://github.com/nrwl/nx-examples/pull/190 Repo: https://github.com/distante/nx-examples
Environment
> NX Report complete - copy this into the issue template
Node : 16.13.1
OS : darwin x64
yarn : 1.22.17
nx : 13.8.1
@nrwl/angular : 13.8.1
@nrwl/cli : 13.8.1
@nrwl/cypress : 13.8.1
@nrwl/detox : undefined
@nrwl/devkit : 13.8.1
@nrwl/eslint-plugin-nx : 13.8.1
@nrwl/express : undefined
@nrwl/jest : 13.8.1
@nrwl/js : 13.8.1
@nrwl/linter : 13.8.1
@nrwl/nest : undefined
@nrwl/next : undefined
@nrwl/node : undefined
@nrwl/nx-cloud : 13.1.4
@nrwl/react : 13.8.1
@nrwl/react-native : undefined
@nrwl/schematics : undefined
@nrwl/storybook : 13.8.1
@nrwl/tao : 13.8.1
@nrwl/web : 13.8.1
@nrwl/workspace : 13.8.1
typescript : 4.5.5
rxjs : 6.5.5
---------------------------------------
Community plugins:
@angular/animations: 13.2.2
@angular/common: 13.2.2
@angular/compiler: 13.2.2
@angular/core: 13.2.2
@angular/forms: 13.2.2
@angular/platform-browser: 13.2.2
@angular/platform-browser-dynamic: 13.2.2
@angular/router: 13.2.2
@ngrx/component-store: 13.0.1
@ngrx/effects: 13.0.1
@ngrx/entity: 13.0.1
@ngrx/router-store: 13.0.1
@ngrx/store: 13.0.1
@angular-devkit/build-angular: 13.2.3
@angular/cli: 13.2.3
@angular/compiler-cli: 13.2.2
@angular/language-service: 13.2.2
@ngrx/store-devtools: 13.0.1
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Don't just lint your code - fix it with Prettier - freeCodeCamp
Taking that to the next level, some linters will actually allow you to pass in an argument to the command running the linter...
Read more >Command Line Interface - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >Lint Code: What Is Linting + When To Use Lint Tools - Perforce
Linting is the process of checking code for programmatic and stylistic errors. Learn how to easily use lint programming and lint tools (also ......
Read more >A Complete Guide to Linting Go Programs - freshman.tech
This article demonstrates a comprehensive linting setup for Go projects, and discusses the best way to introduce it into an existing ...
Read more >How to run eslint --fix from npm script - Stack Overflow
You can run below command: npm run lint -- --fix.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks @meeroslav !
Linting and fixing are fine, but adding
--quiet
breaks the lint results that should be stored on disk. This should fail regardless of whether you run it with local or global nx. I will create fix asap.Thank you for reporting it!