eslint-plugin-vue icon indicating copy to clipboard operation
eslint-plugin-vue copied to clipboard

Add `slots` to `vue/order-in-components` default order

Open FloEdelmann opened this issue 1 year ago • 2 comments

What rule do you want to change?

vue/order-in-components

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.)?

Add slots to default order. Currently, the default order is:

https://github.com/vuejs/eslint-plugin-vue/blob/e936a1524c3bde167e68a365bd6fcd1b86a059b2/lib/rules/order-in-components.js#L14-L76

I'd propose to add the slots option after emits, in the Interface category. This is probably a breaking change, but we could argue that the slots option (which was introduced in Vue 3.3) is not in use for long, so intentionally breaking might be okay.

@ota-meshi what do you think?

FloEdelmann avatar Feb 07 '24 10:02 FloEdelmann

I think we can do it in the next major version. #2153 Also, starting with the next major version, I would like to change our policy so that changes that support Vue and Nuxt features are not considered breaking changes for us.

ota-meshi avatar Feb 07 '24 10:02 ota-meshi

Ah, I only checked open issues, not PRs. I linked the PR to this issue now.

FloEdelmann avatar Feb 07 '24 11:02 FloEdelmann