Skip to content

Change Request: Add a CLI flag to not fail the script in scenarios where a dev fixes a violation but not update the eslint-suppressions.json file #19723

@ankitprahladsoni

Description

@ankitprahladsoni

ESLint version

9.26.0

What problem do you want to solve?

Following the discussion
Would it be possible to add another flag to not fail the script in such scenarios where a dev fixes a violation but not update the eslint-suppressions.json file? We have a multi timezone team, but we also have strict ownership of ESLint related files confined to a very small set of people to make sure no one modifies any ESLint config without prior permission. This ensures that no one is adding any new violation in the eslint-suppressions.json file without permission. But that would be a bit problematic if the ESLint config owners are done for the day and anyone working late hours/different timezone might need to have their PRs checked-in, and it requires owner approval.
In such cases, we would like to let the script run without removing the violation entry in eslint-suppressions.json. If they introduce any new violation, then we would definitely want to fail the script and restrict merging the PR.

What do you think is the correct solution?

ESLint should not always fail with a non-zero code when an ESLint violation is fixed but eslint-suppressions.json isn't updated.

Participation

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

Additional comments

No response

Metadata

Metadata

Assignees

Labels

acceptedThere is consensus among the team that this change meets the criteria for inclusioncoreRelates to ESLint's core APIs and featuresenhancementThis change enhances an existing feature of ESLint

Type

No type

Projects

Status

Complete

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions