Skip to content

Offer suggestions in vue/order-in-components when autofix is not available #2418

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
FloEdelmann opened this issue Mar 5, 2024 · 1 comment · Fixed by #2423
Closed

Offer suggestions in vue/order-in-components when autofix is not available #2418

FloEdelmann opened this issue Mar 5, 2024 · 1 comment · Fixed by #2423

Comments

@FloEdelmann
Copy link
Member

In vue/order-in-components, autofix is only enabled when we are sure that the things we are reordering are free of side effects, to not break the code. However, the automatic reordering is really useful.

I suggest to add the (unsafe) reordering as a suggestion, so the user can decide for themselves whether to automatically reorder the rule in this case.

(Originially reported in #2272)

@Sapphire2k
Copy link

i have a question, how to make it by default applying to automatic reordering, maybe i can change the options it like the order, thanks~

  "vue/order-in-components": ["error", {
    "order": [
      "el",
      "name",
    ],
    "ignoreSideEffects": "1", // <----  here
  }]
}```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants