Skip to content

feat(linter): Support potentially dangerous fixes behind a --fix-dangerously flag #4211

@DonIsaac

Description

@DonIsaac

Some problems are potentially auto fixable, but doing so may be undesireable. In some cases, it could produce incorrect code. In other cases, it could change the behavior of applications.

ESLint handles this with Rule Suggestions, which are made available to language servers but do not get applied via --fix.

Since the linter is mostly used as a CLI (oxlint), we need to support applying suggestions there too. I think we should do this with a --fix-dangerously flag.

Tasks

NOTE: only the first two tasks are prerequisites for #4179

  • refactor(linter): update FIx to support suggestions
  • feat(cli): add --fix-dangerously flag
  • feat(lsp): add command to apply suggestions

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-linterArea - LinterC-enhancementCategory - New feature or requestE-Help WantedExperience level - For the experienced collaborators

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions