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

Error logging if linter exceeds maxWarnings #26906

Closed
1 of 4 tasks
lebbers opened this issue Jul 11, 2024 · 1 comment · Fixed by #27003
Closed
1 of 4 tasks

Error logging if linter exceeds maxWarnings #26906

lebbers opened this issue Jul 11, 2024 · 1 comment · Fixed by #27003
Assignees
Labels
outdated scope: linter Issues related to Eslint support in Nx type: bug

Comments

@lebbers
Copy link

lebbers commented Jul 11, 2024

Current Behavior

If you configure a maxWarning setting of the eslint plugin the process is exited with a non-zero exit code if the max is exceeded.
But there is no indication in the output logs that the process has been terminated because of too many warnings.

Expected Behavior

It would be helpful if an error is logged if the amount of warnings have exceeded the maximum.

GitHub Repo

No response

Steps to Reproduce

  1. add the maxWarnings option to the lint task of a project
 "lint": {
      "executor": "@nx/eslint:lint",
      "options": {
          "maxWarnings": 10
      }
  },
  1. produce more than 10 eslint warnings
  2. execute the lint task

Nx Report

Node   : 18.20.2
OS     : darwin-arm64
yarn   : 4.2.2

nx (global)        : 18.3.5
nx                 : 18.3.5
@nx/js             : 18.3.5
@nx/jest           : 18.3.5
@nx/linter         : 18.3.5
@nx/eslint         : 18.3.5
@nx/workspace      : 18.3.5
@nx/angular        : 18.3.5
@nx/eslint-plugin  : 18.3.5
@nx/node           : 18.3.5
@nx/web            : 18.3.5
@nx/webpack        : 18.3.5
typescript         : 4.9.5

Failure Logs

No response

Package Manager Version

No response

Operating System

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

Additional Information

No response

@FrozenPandaz FrozenPandaz added the scope: linter Issues related to Eslint support in Nx label Jul 16, 2024
@FrozenPandaz FrozenPandaz assigned lebbers and leosvelperez and unassigned lebbers Jul 16, 2024
leosvelperez added a commit that referenced this issue Jul 22, 2024
…ecified maxWarnings for the lint executor (#27003)

<!-- 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 -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #26906
FrozenPandaz pushed a commit that referenced this issue Jul 22, 2024
…ecified maxWarnings for the lint executor (#27003)

<!-- 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 -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #26906

(cherry picked from commit ae48a15)
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 Aug 24, 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
3 participants