Closed
Description
In this issue, I will list the Vue.js 3.x changes that need to be supported by eslint-plugin-vue
.
- Support for Fragments. Plans for the Next Iteration of Vue.js
- Feature/support for fragments #1038 Change
vue/valid-template-root
to allow multiple root nodes. - Feature/support for fragments #1038 Add
vue/no-multiple-template-root
rule that disallows multiple root nodes (for Vue 2).
- Feature/support for fragments #1038 Change
- Removing
v-bind
's.sync
modifier and replacing it with an argument onv-model
. RFC0005- Vue3 v-model API changes #1039 Change
vue/valid-v-model
to allows argument (component only). - Vue3 v-model API changes #1039 Add
vue/no-v-model-argument
rule that disallows argument (for Vue 2). - Vue3 v-model API changes #1039 Add
vue/no-deprecated-v-bind-sync
rule that disallowsv-bind.sync
.
- Vue3 v-model API changes #1039 Change
- Functional API Change. RFC0007
- Add
vue/no-deprecated-functional-template
rule #1119 Addvue/no-deprecated-functional-template
rule that disallows<template functional>
.
- Add
- Global API changes. RFC0009
- Updated to detect Vue3 components. #1073 Add the CallExpression of
app.component
andapp.mixin
toutils/index.isVueComponent
.
- Updated to detect Vue3 components. #1073 Add the CallExpression of
-
v-model
API changes RFC0011- Vue3 v-model API changes #1039 Modify
vue/valid-v-model
rule to provide support for custom modifiers. Supports for Vue.js 3.x #1035 (comment) - Vue3 v-model API changes #1039 Add
vue/no-custom-modifiers-on-v-model
rule to checks if v-model does not contain custom modifiers (Vue 2 backward compatibility) Supports for Vue.js 3.x #1035 (comment)
- Vue3 v-model API changes #1039 Modify
- Composition API. RFC0013
- Add the setting of the
setup
property tovue/order-in-components
rule. - New: Add
vue/no-ref-as-operand
rule #1065 Addvue/no-ref-as-operand
rule. Supports for Vue.js 3.x #1035 (comment) - New: Add
vue/no-watch-after-await
rule #1068 Addvue/no-watch-after-await
rule. Supports for Vue.js 3.x #1035 (comment) - New: Add
vue/no-lifecycle-after-await
rule #1067 Addvue/no-lifecycle-after-await
rule. Supports for Vue.js 3.x #1035 (comment) - New: Add
vue/no-setup-props-destructure
rule #1066 Addvue/no-setup-props-destructure
rule. Supports for Vue.js 3.x #1035 (comment) - no-xxxx-keys: change to handle setup #1082 Change
vue/no-dupe-keys
rule andvue/no-reserved-keys
to handlesetup
.
- Add the setting of the
- Drop support for using numbers (keyCodes) as v-on modifiers. RFC0014
- New: Add
vue/no-deprecated-v-on-number-modifiers
rule #1079 Addvue/no-deprecated-v-on-number-modifiers
rule that disallows numbers asv-on
modifiers. - Add
vue/no-deprecated-vue-config-keycodes
rule #1118 Addvue/no-deprecated-vue-config-keycodes
rule that disallowsVue.config.keyCodes
.
- New: Add
- Remove support for filters. RFC0015
- feat(RFC0015): add no-deprecated-filter rule #1043 Add
vue/no-deprecated-filter
rule that disallows Vue2 filter.
- feat(RFC0015): add no-deprecated-filter rule #1043 Add
- Remove
inline-template
. RFC0016- New: Add
vue/no-deprecated-inline-template
rule #1100 Addvue/no-deprecated-inline-template
rule that disallowinline-template
attributtes.
- New: Add
- Using
<transition>
as component's root will no longer trigger transitions when the component is toggled from the outside.. RFC0017- New: Add
vue/require-v-if-inside-transition
rule #1099 Addvue/require-v-if-inside-transition
rule that checks whether expose a boolean prop to control the presence of content inside<transition>
. e.gv-if
,v-show
. Supports for Vue.js 3.x #1035 (comment)
- New: Add
- Removing object declaration for
data
RFC0019- New: Add
vue/no-deprecated-data-object-declaration
rule #1083 Addvue/no-deprecated-data-object-declaration
rule
- New: Add
- Remove
$on
,$off
and$once
instance methods RFC0020- New: Add
vue/no-deprecated-events-api
rule #1097 Addvue/no-deprecated-events-api
rule
- New: Add
- Custom Elements Interop Improvements RFC0027
- Add
vue/no-deprecated-html-element-is
rule #1117 Addvue/no-deprecated-html-element-is
rule that disallow theis
attribute on HTML elements.
- Add
- "emits" component option RFC0030
- Add the setting of the
emits
property tovue/order-in-components
rule. - Add
vue/require-explicit-emits
rule #1124 Addvue/require-explicit-emits
rule that requires the emits option to have a name called by$emit()
. - Add
vue/return-in-emits-validator
rule #1129 Addvue/return-in-emits-validator
rule enforces that a return statement is present in emits validator.
- Add the setting of the
- Attribute Fallthrough Updates.RFC0031
- Add
vue/no-deprecated-v-on-native-modifier
rule #1130 Addvue/no-deprecated-v-on-native-modifier
rule that disallow.native
modifier onv-on
. - Add
vue/no-deprecated-dollar-listeners-api
rule #1133 Addvue/no-deprecated-dollar-listeners-api
rule that disallow$listeners
.
- Add
- TODO I need to check if any RFCs after RFC0033 are added.
List the changes after #1036 was merged.
- Add categories for Vue 3
-
essential
for Vue 3- Add
vue/no-deprecated-filter
rule. - Add
vue/no-deprecated-v-bind-sync
rule. - New: Add
vue/no-deprecated-v-on-number-modifiers
rule #1079 Addvue/no-deprecated-v-on-number-modifiers
rule. - New: Add
vue/no-deprecated-data-object-declaration
rule #1083 Addvue/no-deprecated-data-object-declaration
rule - New: Add
vue/no-deprecated-events-api
rule #1097 Addvue/no-deprecated-events-api
rule - New: Add
vue/no-deprecated-inline-template
rule #1100 Addvue/no-deprecated-inline-template
rule - New: Add
vue/require-v-if-inside-transition
rule #1099 Addvue/require-v-if-inside-transition
rule. - Add
vue/no-ref-as-operand
rule. - New: Add
vue/no-watch-after-await
rule #1068 Addvue/no-watch-after-await
rule. - Add
vue/no-lifecycle-after-await
rule. - Add
vue/no-setup-props-destructure
rule. - Add the ruleset for Vue.js 3 #1061 Add
vue/no-deprecated-scope-attribute
rule. - Add the ruleset for Vue.js 3 #1061 Add
vue/no-deprecated-slot-attribute
rule. - Add the ruleset for Vue.js 3 #1061 Add
vue/no-deprecated-slot-scope-attribute
rule. - Remove
vue/valid-v-bind-sync
rule. - Add
vue/no-deprecated-functional-template
rule #1119 Addvue/no-deprecated-functional-template
rule. - Add
vue/no-deprecated-html-element-is
rule #1117 Addvue/no-deprecated-html-element-is
rule. - Add
vue/no-deprecated-vue-config-keycodes
rule #1118 Addvue/no-deprecated-vue-config-keycodes
rule. - Add
vue/no-deprecated-v-on-native-modifier
rule #1130 Addvue/no-deprecated-v-on-native-modifier
rule. - Add
vue/no-deprecated-dollar-listeners-api
rule #1133 Addvue/no-deprecated-dollar-listeners
rule. - Add
vue/return-in-emits-validator
rule #1129 Addvue/return-in-emits-validator
rule.
- Add
-
strongly-recommended
for Vue 3 -
recommended
for Vue 3
-
- Change categories for Vue 2
-
essential
for Vue 2- Add
vue/no-multiple-template-root
rule. - Add
vue/no-v-model-argument
rule. - Add
vue/no-custom-modifiers-on-v-model
rule.
- Add
-
strongly-recommended
for Vue 2 -
recommended
for Vue 2
-
refs
https://medium.com/the-vue-point/plans-for-the-next-iteration-of-vue-js-777ffea6fabf
https://github.com/vuejs/rfcs/pulls?utf8=%E2%9C%93&q=is%3Apr+label%3A3.x+
https://vueschool.io/articles/vuejs-tutorials/exciting-new-features-in-vue-3/
https://vue-composition-api-rfc.netlify.com/