Skip to content

Change Request: Add option to report on unused/redundant inline configs / configuration comments #18230

@JoshuaKGoldberg

Description

@JoshuaKGoldberg

ESLint version

8.57.0

What problem do you want to solve?

Right now, nothing in ESLint core stops inline configs (configuration comments) from redundantly repeating the same configuration option and/or severity as already exists. This is similar to unused disable directives: they take up space and can be misleading.

What do you think is the correct solution?

The most straightforward change I can think of would be to add a new --report-unused-inline-configs / reportUnusedInlineConfigs (per the feature's primary naming in #18187) or --report-unused-config-comments / reportUnusedConfigComments (per the common alternate naming).

Participation

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

Additional comments

Inspired by #18218, thanks @inga-lovinde 😄

Edit: eslint/rfcs#121 was filed and accepted for this.

Metadata

Metadata

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