Closed iliubinskii closed 5 months ago
@iliubinskii Have you found a solution?
You can try my rule: https://iliubinskii.github.io/eslint-plugin-misc/sort-keys.html
"misc/sort-keys": [
"warn",
{
overrides: [
{
_id: "defineComponent",
customOrder: [
"name",
"functional",
"components",
"directives",
"inheritAttrs",
"props",
"emits",
"setup",
"template"
],
selector:
"CallExpression[callee.name=defineComponent] > ObjectExpression"
}
]
}
]
Thx for the plugin.
This pluging conflicts with this Vue rule: https://eslint.vuejs.org/rules/order-in-components.html
For example, Vue rule puts "name" property above "component" property.
Vue rule sorts ONLY default export.
So, the conflict could be fixed by adding option "ignoreDefaultExport".