`nx run-many --target=lint --all` doesnt check linting rules for a fresh nx workspace
See original GitHub issueCurrent 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
- Clone the repo above
- yarn install etc.
- run the two linter commands above
- 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:
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:6 (3 by maintainers)
Top Results From Across the Web
ESLint: Your Nx Workspace Rules - James Henry - YouTube
In this talk we will cover what it takes to create and run lint rules directly in your Nx workspace specific to your...
Read more >Speed up your Yarn Workspace with Nx | by Emily Xiong
If you run yarn test , notice it would run linting for each app and library (in this repo, it uses the test...
Read more >Setting Up A DevOps Pipeline With Nx - Christian Lüdemann
If you notice in the ci.yml , the lint job is slightly different from the rest. Nx has a special command called workspace-lint...
Read more >How to pass arguments to eslint when using nx lint
However, when using nx lint / nx run-many --all --target=lint / nx affected:lint - these arguments don't appear to be supported, ...
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
Actually, this is a feature, not a bug.
Nx commands that (potentially) run target on multiple projects (such as
affected
orrun-many
) now by default run in the compact view. Forlinter
, this means that warnings are hidden. If you would run the same command with--verbose
you would achieve the same result:@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.