Skip to content
This repository was archived by the owner on Nov 10, 2022. It is now read-only.
This repository was archived by the owner on Nov 10, 2022. It is now read-only.

Add warning for suggested changes to rule docs #899

Open
@btmills

Description

@btmills

In the 2021-12-16 TSC meeting, we discussed feat: Fixer for missing unicode flag in no-misleading-character-class. That PR adds an editor suggestion that will add the u flag. Sometimes, adding that flag may change behavior of other portions of the regular expression unrelated to the misleading character class. While adding the u flag is probably the best fix most of the time, we're implementing the change as a suggestion rather than an autofix because we can't be sure the indirect behavior changes are correct.

More generally, we want to make sure users know that they should consider all possible implications of the behavior change before applying editor suggestions. Currently, documentation pages for rules with suggestions (like no-unsafe-negation) include a light bulb icon and the text "Some problems reported by this rule are manually fixable by editor suggestions."

In the meeting, we agreed to change the wording to "Some problems reported by this rule are manually may be fixable by editor suggestions. (Warning)" and link "Warning" to a page that describes the potential pitfalls.

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedThere is consensus among the team that this change meets the criteria for inclusiondocumentationRelates to ESLint's documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions