Closed Ericlm closed 2 months ago
Unplugin Vue Router will not be officially supported in eslint-plugin-vue, so this feature request is out of scope.
But you can already adjust the order manually. I think it should be possible to allow custom values there, so that you could add definePage
there manually. Pull request welcome for that change!
What rule do you want to change? I would like to update the
define-macros-order
rule.Does this change cause the rule to produce more or fewer warnings? More.
How will the change be implemented? (New option, new default behavior, etc.)? With the unplugging-vue-router which allows routes to be typesafe, there is now a new definePage macro that allows to customize the generated route.
I think this macro should be ordered just like defineProps, emits, slots etc. I think it could be at the top of the component, even before defineModel.
Please provide some example code that this change will affect:
What does the rule currently do for this code? The rule does not enforce a location for
definePage
, so it can be placed anywhere in the script.What will the rule do after it's changed? It will enforce the
definePage
macro to be at the top of the script (or elsewhere).