Skip to content

fix: update error message for unused suppressions#20496

Merged
mdjermanovic merged 4 commits intoeslint:mainfrom
DMartens:excess-suppression-message
Feb 13, 2026
Merged

fix: update error message for unused suppressions#20496
mdjermanovic merged 4 commits intoeslint:mainfrom
DMartens:excess-suppression-message

Conversation

@DMartens
Copy link
Copy Markdown
Contributor

Prerequisites checklist

What is the purpose of this pull request? (put an "X" next to an item)

[x] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofix to a rule
[ ] Add a CLI option
[ ] Add something to the core
[ ] Other, please explain:

What changes did you make? (Give an overview)

Update the message of the CLI when there are excess suppressions.
Now it also mentions the flag --pass-on-unpruned-suggestions.
Fixes #20490.

Is there anything you'd like reviewers to focus on?

Should the message be multiline, for example:

Error message:
- `--prune-suggestions` ...
- `--pass-on-unpruned-suggestions` ...

@DMartens DMartens requested a review from a team as a code owner February 10, 2026 19:39
@github-project-automation github-project-automation bot moved this to Needs Triage in Triage Feb 10, 2026
@netlify
Copy link
Copy Markdown

netlify bot commented Feb 10, 2026

Deploy Preview for docs-eslint canceled.

Name Link
🔨 Latest commit 5954ea2
🔍 Latest deploy log https://app.netlify.com/projects/docs-eslint/deploys/698def0d0fdfc7000896518c

@eslint-github-bot eslint-github-bot bot added the documentation Relates to ESLint's documentation label Feb 10, 2026
@github-actions github-actions bot added the cli Relates to ESLint's command-line interface label Feb 10, 2026
@mdjermanovic mdjermanovic added the accepted There is consensus among the team that this change meets the criteria for inclusion label Feb 11, 2026
@mdjermanovic mdjermanovic moved this from Needs Triage to Implementing in Triage Feb 11, 2026
@mdjermanovic mdjermanovic changed the title docs: update message for excess suggestions fix: update message for excess suggestions Feb 11, 2026
@eslint-github-bot eslint-github-bot bot added the bug ESLint is working incorrectly label Feb 11, 2026
Copy link
Copy Markdown
Member

@mdjermanovic mdjermanovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think a single line message is fine, just left a suggestion to reword it a bit.

@mdjermanovic mdjermanovic changed the title fix: update message for excess suggestions fix: update error message for unused suppressions Feb 11, 2026
lib/cli.js Outdated
if (unusedSuppressionsCount > 0) {
log.error(
"There are suppressions left that do not occur anymore. Consider re-running the command with `--prune-suppressions`.",
"There are suppressions left that do not occur anymore. To resolve this, re-run the command with `--prune-suggestions` to remove unused suppressions. To ignore unused suppressions, use `--pass-on-unpruned-suppressions`.",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"There are suppressions left that do not occur anymore. To resolve this, re-run the command with `--prune-suggestions` to remove unused suppressions. To ignore unused suppressions, use `--pass-on-unpruned-suppressions`.",
"There are suppressions left that do not occur anymore. To resolve this, re-run the command with `--prune-suppressions` to remove unused suppressions. To ignore unused suppressions, use `--pass-on-unpruned-suppressions`.",

Typo.

Copy link
Copy Markdown
Member

@mdjermanovic mdjermanovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@mdjermanovic mdjermanovic merged commit 04c2147 into eslint:main Feb 13, 2026
38 checks passed
@github-project-automation github-project-automation bot moved this from Implementing to Complete in Triage Feb 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accepted There is consensus among the team that this change meets the criteria for inclusion bug ESLint is working incorrectly cli Relates to ESLint's command-line interface documentation Relates to ESLint's documentation

Projects

Status: Complete

Development

Successfully merging this pull request may close these issues.

Change Request: Improve unusedSuppressionsCount error message

2 participants