Skip to content

Bug: Counters for removed files remain in eslint-suppressions.json #19778

@Alex-Sokolov

Description

@Alex-Sokolov

Environment

Node version: v18.20.8
npm version: v10.8.2
Local ESLint version: v9.27.0 (Currently used)
Global ESLint version: Not found
Operating System: darwin 24.5.0

What parser are you using?

Default (Espree)

What did you do?

  • Have some project
  • Install latest ESLint
  • Run eslint . --quiet --suppress-all on codebase
  • Found eslint-suppressions.json with all counters about errors
  • Remove some unused file (which have some suppressions)

What did you expect to happen?

  • eslint . finished without errors with notify about left suppressions
  • eslint . --prune-suppressions cleaned counters for removed file
  • eslint-suppressions.json don't have counters for removed file

What actually happened?

  • eslint . finished without errors without notify about suppressions
  • eslint . --prune-suppressions finished without errors
  • eslint-suppressions.json have counters for removed file

Link to Minimal Reproducible Example

Online IDE doesn't have terminal for generation eslint-suppressions.json and updating it

Participation

  • I am willing to submit a pull request for this issue.

Additional comments

As workaround:

  • Remove eslint-suppressions.json
  • Run eslint . --suppress-all
  • Now we see removals in eslint-suppressions.json diff

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedThere is consensus among the team that this change meets the criteria for inclusionbugESLint is working incorrectlyrepro:yesIssues with a reproducible example

    Type

    No type

    Projects

    Status

    Complete

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions