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

eslint 9 support param --quiet which skip run 'warn' rules instead of filter warnings from output #28291

Closed
1 of 4 tasks
pumano opened this issue Oct 4, 2024 · 1 comment · Fixed by #28743
Closed
1 of 4 tasks
Assignees
Labels
outdated scope: linter Issues related to Eslint support in Nx type: bug

Comments

@pumano
Copy link
Contributor

pumano commented Oct 4, 2024

Current Behavior

eslint 9 has --quiet param, that not run warn rules. When I pass that param via:

nx run-many --exclude=lib1,lib2 --target=lint --quiet

that param not passed to eslint, just filter warnings instead for eslint 9 should not run rules with warnings totally.

Expected Behavior

nx run-many --exclude=lib1,lib2 --target=lint --quiet should pass --quiet param for eslint 9 directly.

That feature is very time efficient at CI environments.

GitHub Repo

No response

Steps to Reproduce

  1. TIMING=1 nx run-many --exclude=lib1,lib2 --target=lint --quiet
  2. rules with warn / error

console output shows executed warn rules too

Nx Report

Node : 20.17.0
OS : darwin-arm64
Native Target : aarch64-macos
yarn : 4.5.0

nx : 19.8.3
@nx/js : 19.8.3
@nx/jest : 19.8.3
@nx/linter : 19.8.3
@nx/eslint : 19.8.3
@nx/workspace : 19.8.3
@nx/angular : 19.8.3
@nx/cypress : 19.8.3
@nx/devkit : 19.8.3
@nx/eslint-plugin : 19.8.3
@nx/storybook : 19.8.3
@nrwl/tao : 19.8.3
@nx/web : 19.8.3
@nx/webpack : 19.8.3
typescript : 5.5.4

Registered Plugins:
@nx/eslint/plugin
@nx/storybook/plugin

Community plugins:
nx-stylelint : 17.1.5

Failure Logs

[2024-10-04T00:33:43.961Z] > nx run ui-common:lint --quiet

[2024-10-04T00:33:43.961Z]

[2024-10-04T00:33:43.961Z]

[2024-10-04T00:33:43.961Z] Linting "ui-common"...

[2024-10-04T00:33:43.961Z] Quiet mode enabled - filtering out warnings

[2024-10-04T00:33:43.961Z]

[2024-10-04T00:33:43.961Z]

[2024-10-04T00:33:43.961Z] ✔ All files pass linting

[2024-10-04T00:33:43.961Z]

[2024-10-04T00:33:43.961Z] Rule | Time (ms) | Relative

[2024-10-04T00:33:43.961Z] :----------------------------------------|----------:|--------:

[2024-10-04T00:33:43.961Z] prettier/prettier | 5685.375 | 55.1%

[2024-10-04T00:33:43.961Z] rxjs/finnish | 1079.124 | 10.5% (warn rule)

[2024-10-04T00:33:43.961Z] import/no-duplicates | 922.201 | 8.9%

[2024-10-04T00:33:43.961Z] @typescript-eslint/naming-convention | 339.692 | 3.3%

[2024-10-04T00:33:43.961Z] sonarjs/no-ignored-return | 292.706 | 2.8%

[2024-10-04T00:33:43.961Z] @nx/enforce-module-boundaries | 259.983 | 2.5%

[2024-10-04T00:33:43.961Z] @nx/dependency-checks | 189.698 | 1.8%

[2024-10-04T00:33:43.961Z] @typescript-eslint/no-restricted-imports | 112.740 | 1.1%

[2024-10-04T00:33:43.961Z] simple-import-sort/imports | 77.164 | 0.7%

[2024-10-04T00:33:43.961Z] comma-dangle | 75.861 | 0.7%

Package Manager Version

No response

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

No response

@jaysoo jaysoo added the scope: linter Issues related to Eslint support in Nx label Oct 14, 2024
@jaysoo jaysoo self-assigned this Oct 14, 2024
pumano added a commit to pumano/nx that referenced this issue Nov 1, 2024
pumano added a commit to pumano/nx that referenced this issue Nov 4, 2024
pumano added a commit to pumano/nx that referenced this issue Nov 4, 2024
@jaysoo jaysoo closed this as completed in bb878aa Nov 4, 2024
FrozenPandaz pushed a commit that referenced this issue Nov 5, 2024
closes #28291

<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior
<!-- This is the behavior we have today -->
eslint 9 support --quiet param for not run warn rules, but nx not pass
that param directly
## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
nx executor should pass --quiet directly to eslint
## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #28291

(cherry picked from commit bb878aa)
Copy link

github-actions bot commented Dec 5, 2024

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 Dec 5, 2024
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.

2 participants