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

linting with --fix passes when it should not pass. #9103

Closed
distante opened this issue Feb 24, 2022 · 6 comments · Fixed by #9348
Closed

linting with --fix passes when it should not pass. #9103

distante opened this issue Feb 24, 2022 · 6 comments · Fixed by #9348
Assignees
Labels
outdated scope: linter Issues related to Eslint support in Nx type: bug

Comments

@distante
Copy link

Current 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

  1. Define a member that break the readonly rule
  2. Call npx nx run-many --target=lint --quiet --skip-nx-cache --all and see how it fails.
  3. Call npx nx run-many --target=lint --quiet --skip-nx-cache --all --fix, it passes.

PR: nrwl/nx-examples#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
@distante
Copy link
Author

Extra info, I do not use nx globally, that is why I always call npx nx.

When nx is installed globally (I just install it, together with yarn so I could call nx report, --fix changes the files.!

@AgentEnder AgentEnder added the scope: linter Issues related to Eslint support in Nx label Mar 14, 2022
@meeroslav meeroslav self-assigned this Mar 15, 2022
@meeroslav
Copy link
Contributor

When nx is installed globally (I just install it, together with yarn so I could call nx report, --fix changes the files.!

What version is installed globally then? If your global version is the same as the local (13.8.1) there shouldn't be any difference.

@distante
Copy link
Author

The global version is 13.8.3

@meeroslav
Copy link
Contributor

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!

@distante
Copy link
Author

Thanks @meeroslav !

@github-actions
Copy link

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated scope: linter Issues related to Eslint support in Nx type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants