-
Notifications
You must be signed in to change notification settings - Fork 44
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
Deprecate rules for sorting Vue, Svelte and Astro attributes #175
Comments
I think this is a good idea! I'm using Vue, and I already have the eslint plugin grouping Vue attributes. Adding perfectionist required to build customGroups (see #112). |
vue/attributes-order is better than nothing. |
@idmytro We need to have the same rule in eslint-plugin-astro to make it all deprecated |
The only downside is that I can't ignore “:” when ordering, tags starting with “:” are always higher than other tags. Of course, if you don't have the energy to maintain it all, I show my support for you. After all, open source projects are just generating power with love and doing what you like ~ thank you for your efforts! |
Before deprecating the rules, we plan to improve the rules in the corresponding ESLint plugins. Also we plan to add features to the |
I'm a Svelte developer and I love |
@fvilers Can you tell me what settings you have used previously? And what is missing in |
Out of the box the natural rule was really fine. I just configured it as this:
The problem with |
@ota-meshi Can we create an issue in https://github.com/sveltejs/eslint-plugin-svelte ? |
Three rules were added in version 2.0.0:
sort-vue-attributes
sort-svelte-attributes
sort-astro-atttributes
At the moment I'm thinking about giving them up. There are several reasons for this:
These rules use non-standard JavaScript or TypeScript syntax. For this reason, we have to use other parsers along with them:
That's a hard thing to maintain.
These rules extend beyond the plugin’s core ideology. The primary goal is to support sorting various elements that are part of the JavaScript, TypeScript, or JSX/TSX language standards.
Supporting third-party libraries and frameworks could make the plugin unwieldy and complicated for users.
Currently, we only plan to support standard pieces.
There are already similar ESLint rules:
These rules could serve as adequate replacements.
I have a suggestion, move the missing functionality to ESLint plugins Vue, Svelte and Astro and maintain it there. First of all, it is the ability to sort attributes not only alphabetically, but also by line length.
The Astro plugin currently lacks this rule, so it could be transferred in its entirety.
I was interested to hear @ota-meshi opinion as the author of these plugins.
I would also like to hear the opinions of other users of the plugin.
The text was updated successfully, but these errors were encountered: