Skip to content

Resolve conflicts with arrow-body-style(and other rules) #383

Open
@fisker

Description

To resolve this problem, all we have to do is protect our fix "range", so other rules won't do fix inside it.

  • Question: how wide should our range be, the whole file or the max diff range. I've draft Fix conflicts with arrow-body-style #379 to protect whole file.
  • Impact: This will slow down eslint fix, ESLint takes up to 10 rounds to run rules, in the round of prettier/prettier other rule won't work.
  • Problem: We don't want report issues on whole file, but we can still report each difference but fix the whole file, use ESLint through CLI won't feel anything, but if running in editor, people may don't expect that happen. I got no good solution, in Fix conflicts with arrow-body-style #379 I added a notice behind the error message, and to fix one difference I used suggestion API.

I'd like to ship this feature under "experimentalFix" flag first.

Another alternative solution #381 is protect whole file on every fix of difference, but this will takes many rounds to fix the whole file, seems unacceptable solution.

Thoughts?

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions