-
-
Notifications
You must be signed in to change notification settings - Fork 681
Question: Configure vue/order-in-components
to play nice with sort-keys
?
#286
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
Comments
I'm afraid we can't do anything about that. One rule does not know anything about any other, and we can't interfere with what other rules should or shouldn't lint. You have to either disable |
That's a pity. Thanks for the reply. |
Yeah, it's a pity. I achieved to keep this rule enabled in all ./src/components/.eslintrc.js const eslint = {
root: false,
extends: ["../../.eslintrc.js"],
rules: {
"sort-keys": [0]
}
};
module.exports = eslint; ./src/App.vue <template></template>
<script>
/* eslint-disable sort-keys */
export default {}
</script>
<style></style>
I know, this is not the best solution, but I hope this works for you |
Thanks, I am also able to do this with eslint comments but that is something that we wish to avoid. And of course that disables the rule for every object, not just the vue object, that requires many more disable/enables. |
or disable the rule for *.vue .eslintrc.js
|
Thanks, but not the solution we were looking for as then the rule is off for standard objects. |
I haven't found a bettor option... most of my code is in imported from .js files where the filter works. |
We disabled the rule a while back after, and a colleague wrote a sorter using jscodeshift. |
I have
vue/order-in-components
set, but I also havesort-keys
enabled for natural sort order.I wanted to know if there is some configuration that I can use to make the two rules play nicely together?
Currently when I sort
vue
components in order, thensort-keys
errors about natural sort order. I know that I can litter my components witheslint
disable comments, but I would prefer no to do that if it is at all possible?The text was updated successfully, but these errors were encountered: