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

nx run-many --target=lint --all doesnt check linting rules for a fresh nx workspace #9638

Closed
mondo192 opened this issue Mar 31, 2022 · 7 comments
Assignees
Labels
outdated scope: linter Issues related to Eslint support in Nx type: bug

Comments

@mondo192
Copy link

mondo192 commented Mar 31, 2022

Current Behavior

Running the command yarn nx run-many --target=lint --projects=spa --skip-nx-cache doesn't catch lint errors/warnings. Instead running the command yarn nx run spa:lint --skip-nx-cache properly catches the lint issues.

Expected Behavior

Running the command yarn nx run-many --target=lint --all should lint all projects in the repo.

Steps to Reproduce

https://github.com/mondo192/nx-workspace

  1. Clone the repo above
  2. yarn install etc.
  3. run the two linter commands above
  4. They dont behave the same

Failure Logs

Environment


   Node : 16.14.2
   OS   : linux x64
   yarn : 3.2.0
   
   nx : 13.9.5
   @nrwl/angular : Not Found
   @nrwl/cypress : 13.9.5
   @nrwl/detox : Not Found
   @nrwl/devkit : 13.9.5
   @nrwl/eslint-plugin-nx : 13.9.5
   @nrwl/express : Not Found
   @nrwl/jest : 13.9.5
   @nrwl/js : 13.9.5
   @nrwl/linter : 13.9.5
   @nrwl/nest : 13.9.5
   @nrwl/next : Not Found
   @nrwl/node : 13.9.5
   @nrwl/nx-cloud : Not Found
   @nrwl/nx-plugin : Not Found
   @nrwl/react : 13.9.5
   @nrwl/react-native : Not Found
   @nrwl/schematics : Not Found
   @nrwl/storybook : 13.9.5
   @nrwl/web : 13.9.5
   @nrwl/workspace : 13.9.5
   typescript : 4.5.5
   rxjs : 7.5.5
   ---------------------------------------
   Community plugins:
@mondo192 mondo192 changed the title nx run-many --target=lint --all doesnt apply linting rules nx run-many --target=lint --all doesnt check linting rules Mar 31, 2022
@AgentEnder AgentEnder added the scope: linter Issues related to Eslint support in Nx label Mar 31, 2022
@mondo192 mondo192 changed the title nx run-many --target=lint --all doesnt check linting rules nx run-many --target=lint --all doesnt check linting rules for a fresh nx workspace Mar 31, 2022
@mondo192
Copy link
Author

Any updates on this?

@meeroslav
Copy link
Contributor

Sorry for waiting, I will get to this as soon as possible.

@meeroslav
Copy link
Contributor

meeroslav commented May 5, 2022

Actually, this is a feature, not a bug.

Nx commands that (potentially) run target on multiple projects (such as affected or run-many) now by default run in the compact view. For linter, this means that warnings are hidden. If you would run the same command with --verbose you would achieve the same result:

yarn nx run-many --target=lint --projects=spa --skip-nx-cache --verbose

Please note that this refers only to warnings. In case of error, your report would exit the compact view and show the full error message.

Screenshot 2022-05-05 at 15 41 53

@ashhadsheikh
Copy link

Actually, this is a feature, not a bug.

Nx commands that (potentially) run target on multiple projects (such as affected or run-many) now by default run in the compact view. For linter, this means that warnings are hidden. If you would run the same command with --verbose you would achieve the same result:

yarn nx run-many --target=lint --projects=spa --skip-nx-cache --verbose

Please note that this refers only to warnings. In case of error, your report would exit the compact view and show the full error message.

Screenshot 2022-05-05 at 15 41 53

+1, it worked!

@ElvenSpellmaker
Copy link

This really seems like a workaround especially as it means it takes longer and it no longer uses the cache even though the cache has the warnings in it.

--verbose seems to do far more than just change the compact format to full.

@meeroslav
Copy link
Contributor

@ElvenSpellmaker this is not a workaround nor it influences the caching.

Caching is done per command, so when you add --verbose you are changing the command. If you would run it again you would see that the result is cached (if run was successful). The only speed difference you might see is the amount of time it takes to print our all the logs vs compact one.

@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 21, 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

No branches or pull requests

5 participants