Skip to content

vue/component-tags-order - Could it be made fixable? #1463

Closed
@Ariane-B

Description

@Ariane-B

What rule do you want to change?

vue/component-tags-order

Does this change cause the rule to produce more or fewer warnings?

No

How will the change be implemented? (New option, new default behavior, etc.)?

I wish this rule could be auto-changed on --fix

Please provide some example code that this change will affect:

None. Rule stays the same.

What does the rule currently do for this code?

No changes.

What will the rule do after it's changed?

On --fix, it will swap a single-file component's main tags around so they're in the order prescribed by the rule.

Additional context

I've been thinking of putting together a regex that would allow me to run a mass replacement on my project to ensure all tags are in the proper order, and it seems like it's probably possible. If a regex can do it, it makes me think that it's probably possible too, and easier, for a tool that "understands" the code like ESLint.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions