vuejs/eslint-plugin-vue
### [`v7.0.1`](https://togithub.com/vuejs/eslint-plugin-vue/releases/v7.0.1)
[Compare Source](https://togithub.com/vuejs/eslint-plugin-vue/compare/v7.0.0...v7.0.1)
#### 🐛 Bug Fixes
- [#1317](https://togithub.com/vuejs/eslint-plugin-vue/issues/1317) Avoid redundant global self-require of the plugin.
* * *
**All commits:** [v7.0.0 -> v7.0.1](https://togithub.com/vuejs/eslint-plugin-vue/compare/v7.0.0...v7.0.1)
### [`v7.0.0`](https://togithub.com/vuejs/eslint-plugin-vue/releases/v7.0.0)
[Compare Source](https://togithub.com/vuejs/eslint-plugin-vue/compare/v6.2.2...v7.0.0)
#### :rocket: Highlight
- Support for Vue.js 3.0 "One Piece".
- Support for ESLint 7.x.
- Support for ECMAScript 2020.
- Added 66 new rules.
#### 💥 Breaking Changes
- [#1209](https://togithub.com/vuejs/eslint-plugin-vue/issues/1209) Change support version of ESLint from 6.0.0 to 6.2.0.
- Updated presets configs.
- Changed `plugin:vue/base` config.
- [#1237](https://togithub.com/vuejs/eslint-plugin-vue/issues/1237) Removed `jsx:true` from shareable configs.
- [#1209](https://togithub.com/vuejs/eslint-plugin-vue/issues/1209) Changed `parserOptions.ecmaVersion` to 2020.
- [#1303](https://togithub.com/vuejs/eslint-plugin-vue/issues/1303) Added `vue/experimental-script-setup-vars` rule.
- Changed `plugin:vue/essential` config.
- Same changes as above.
- [#1036](https://togithub.com/vuejs/eslint-plugin-vue/issues/1036) Added `vue/valid-v-bind-sync` rule.
- [#1036](https://togithub.com/vuejs/eslint-plugin-vue/issues/1036) Added `vue/valid-v-slot` rule.
- [#1036](https://togithub.com/vuejs/eslint-plugin-vue/issues/1036) Added `vue/no-custom-modifiers-on-v-model` rule.
- [#1036](https://togithub.com/vuejs/eslint-plugin-vue/issues/1036) Added `vue/no-multiple-template-root` rule.
- [#1036](https://togithub.com/vuejs/eslint-plugin-vue/issues/1036) Added `vue/no-v-model-argument` rule.
- [#1148](https://togithub.com/vuejs/eslint-plugin-vue/issues/1148) Added `vue/no-mutating-props` rule.
- [#1156](https://togithub.com/vuejs/eslint-plugin-vue/issues/1156) Added `vue/no-arrow-functions-in-watch` rule.
- [#1166](https://togithub.com/vuejs/eslint-plugin-vue/issues/1166) Added `vue/custom-event-name-casing` rule.
- [#1239](https://togithub.com/vuejs/eslint-plugin-vue/issues/1239) Added `vue/no-dupe-v-else-if` rule.
- [#1281](https://togithub.com/vuejs/eslint-plugin-vue/issues/1281) Added `vue/no-v-for-template-key` rule.
- Changed `plugin:vue/strongly-recommended` config.
- Same changes as above.
- [#1036](https://togithub.com/vuejs/eslint-plugin-vue/issues/1036) Added `vue/component-definition-name-casing` rule.
- [#1036](https://togithub.com/vuejs/eslint-plugin-vue/issues/1036) Added `vue/v-slot-style` rule.
- [#1036](https://togithub.com/vuejs/eslint-plugin-vue/issues/1036) Removed `vue/name-property-casing` rule.
- [#1149](https://togithub.com/vuejs/eslint-plugin-vue/issues/1149) Added `vue/one-component-per-file` rule.
- Changed `plugin:vue/recommended` config.
- Same changes as above.
- [#1036](https://togithub.com/vuejs/eslint-plugin-vue/issues/1036) Added `vue/component-tags-order` rule.
- [#1179](https://togithub.com/vuejs/eslint-plugin-vue/issues/1179) Added `vue/no-multiple-slot-args` rule.
- [#1238](https://togithub.com/vuejs/eslint-plugin-vue/issues/1238) Added `vue/no-lone-template` rule.
- [#1036](https://togithub.com/vuejs/eslint-plugin-vue/issues/1036) Changed `vue/name-property-casing` rule to be deprecate.
- [#1120](https://togithub.com/vuejs/eslint-plugin-vue/issues/1120) Added the support of descriptions in directive comments.
- [#1120](https://togithub.com/vuejs/eslint-plugin-vue/issues/1120) Added the support for block-level directive comments.
- Changed the default order option for `vue/order-in-components` rule.
- Add options for Vue.js 3.x.
- [#1181](https://togithub.com/vuejs/eslint-plugin-vue/issues/1181) `emits` to after `props`.
- [#1181](https://togithub.com/vuejs/eslint-plugin-vue/issues/1181) `setup` to after `emits`.
- [#1181](https://togithub.com/vuejs/eslint-plugin-vue/issues/1181) `beforeUnmount` and `unmounted` to LIFECYCLE_HOOKS.
- [#1181](https://togithub.com/vuejs/eslint-plugin-vue/issues/1181) `renderTracked` and `renderTriggered` to LIFECYCLE_HOOKS.
- Add options for Vue.js 2.x.
- [#1181](https://togithub.com/vuejs/eslint-plugin-vue/issues/1181) `provide` and `inject` to after `mixins`.
- [#1181](https://togithub.com/vuejs/eslint-plugin-vue/issues/1181) `errorCaptured` to LIFECYCLE_HOOKS.
- Add options for Vue Router.
- [#1107](https://togithub.com/vuejs/eslint-plugin-vue/issues/1107) ROUTER_GUARDS (`beforeRouteEnter`, `beforeRouteUpdate` and `beforeRouteLeave`) to after `provide / inject` (`provide / inject` was added after `mixins`).
- Add options for Nuxt.
- [#1107](https://togithub.com/vuejs/eslint-plugin-vue/issues/1107) `key` to after `name`.
- [#1107](https://togithub.com/vuejs/eslint-plugin-vue/issues/1107) `layout`, `middleware`, `validate`, `scrollToTop`, `transition`, `loading` to after ROUTER_GUARDS (ROUTER_GUARDS was added after `provide / inject`).
- [#1107](https://togithub.com/vuejs/eslint-plugin-vue/issues/1107) `watchQuery` to after `watch`.
- Change options for Nuxt.
- [#1107](https://togithub.com/vuejs/eslint-plugin-vue/issues/1107) `head` move from after `methods` to after `data`.
- [#1268](https://togithub.com/vuejs/eslint-plugin-vue/issues/1268) `fetch` move from after `props / propsData` to after `data`.
#### ✨ Enhancements
##### Core:
- [#1120](https://togithub.com/vuejs/eslint-plugin-vue/issues/1120) Added the support of descriptions in directive comments.
- [#1120](https://togithub.com/vuejs/eslint-plugin-vue/issues/1120) Added the support for block-level directive comments.
- [#1073](https://togithub.com/vuejs/eslint-plugin-vue/issues/1073), [#1088](https://togithub.com/vuejs/eslint-plugin-vue/issues/1088) Updated the rules of this plugin to detect Vue.js 3.x components.
- [#1064](https://togithub.com/vuejs/eslint-plugin-vue/issues/1064) Updated the rules of this plugin to be able to analyze the arrow function component options.
- [#1152](https://togithub.com/vuejs/eslint-plugin-vue/issues/1152) Changed casing conversion logic to behave like Vue core logic.
- Changed `plugin:vue/essential` config.
- Changed `plugin:vue/strongly-recommended` config.
- Changed `plugin:vue/recommended` config.
##### New Rulesets:
- Added `plugin:vue/vue3-essential` config.
- Added `plugin:vue/vue3-strongly-recommended` config.
- Added `plugin:vue/vue3-recommended` config.
##### New Rules:
##### for Vue.js 3.x:
- [#1039](https://togithub.com/vuejs/eslint-plugin-vue/issues/1039) Added `vue/no-deprecated-v-bind-sync` rule that reports when deprecated `.sync` modifier is used on `v-bind` directive. Related to [RFC0005]
- [#1043](https://togithub.com/vuejs/eslint-plugin-vue/issues/1043) Added `vue/no-deprecated-filter` rule that reports usage of filters syntax removed in Vue.js 3.0.0+. Related to [RFC0015]
- [#1065](https://togithub.com/vuejs/eslint-plugin-vue/issues/1065) Added `vue/no-ref-as-operand` rule that reports cases where a ref is used incorrectly as an operand. Related to [RFC0013]
- [#1066](https://togithub.com/vuejs/eslint-plugin-vue/issues/1066) Added `vue/no-setup-props-destructure` rule that reports the destructuring of props passed to setup causing the value to lose reactivity. Related to [RFC0013]
- [#1067](https://togithub.com/vuejs/eslint-plugin-vue/issues/1067) Added `vue/no-lifecycle-after-await` rule that reports the lifecycle hooks after await expression. Related to [RFC0013]
- [#1079](https://togithub.com/vuejs/eslint-plugin-vue/issues/1079) Added `vue/no-deprecated-v-on-number-modifiers` rule that reports use of deprecated `KeyboardEvent.keyCode` modifier on `v-on` directive. Related to [RFC0014]
- [#1083](https://togithub.com/vuejs/eslint-plugin-vue/issues/1083) Added `vue/no-deprecated-data-object-declaration` rule that reports use of deprecated object declaration on `data` property. Related to [RFC0019]
- [#1097](https://togithub.com/vuejs/eslint-plugin-vue/issues/1097) Added `vue/no-deprecated-events-api` rule that reports use of deprecated `$on`, `$off` and `$once` api (removed in Vue.js v3.0.0+). Related to [RFC0020]
- [#1068](https://togithub.com/vuejs/eslint-plugin-vue/issues/1068) Added `vue/no-watch-after-await` rule that reports the `watch()` after `await` expression. [RFC0013]
- [#1099](https://togithub.com/vuejs/eslint-plugin-vue/issues/1099), [#1105](https://togithub.com/vuejs/eslint-plugin-vue/issues/1105) Added `vue/require-toggle-inside-transition` rule that reports elements inside `` that do not control the display. Related to [RFC0017]
- [#1100](https://togithub.com/vuejs/eslint-plugin-vue/issues/1100) Added `vue/no-deprecated-inline-template` rule that reports deprecated `inline-template` attributes (removed in Vue.js v3.0.0+) Related to [RFC0016]
- [#1117](https://togithub.com/vuejs/eslint-plugin-vue/issues/1117) Added `vue/no-deprecated-html-element-is` rule that reports deprecated the is attribute on HTML elements (removed in Vue.js v3.0.0+). Related to [RFC0027]
- [#1118](https://togithub.com/vuejs/eslint-plugin-vue/issues/1118) Added `vue/no-deprecated-vue-config-keycodes` rule that reports use of deprecated Vue.config.keyCodes (removed in Vue.js 3.0.0+). Related to [RFC0014]
- [#1119](https://togithub.com/vuejs/eslint-plugin-vue/issues/1119) Added `vue/no-deprecated-functional-template` rule that reports deprecated the functional template (removed in Vue.js 3.0.0+). Related to [RFC0007]
- [#1124](https://togithub.com/vuejs/eslint-plugin-vue/issues/1124) Added `vue/require-explicit-emits` rule that reports event triggers not declared with the emits option. Related to [RFC0030]
- [#1129](https://togithub.com/vuejs/eslint-plugin-vue/issues/1129) Added `vue/return-in-emits-validator` rule enforces that a return statement is present in emits validators. Related to [RFC0030]
- [#1130](https://togithub.com/vuejs/eslint-plugin-vue/issues/1130) Added `vue/no-deprecated-v-on-native-modifier` rule that reports use of deprecated `.native` modifier on `v-on` directive. Related to [RFC0031]
- [#1133](https://togithub.com/vuejs/eslint-plugin-vue/issues/1133) Added `vue/no-deprecated-dollar-listeners-api` rule that reports use of deprecated `$listeners`. Related to [RFC0031]
- [#1177](https://togithub.com/vuejs/eslint-plugin-vue/issues/1177) Added `vue/no-deprecated-dollar-scopedslots-api` rule that reports use of deprecated `$scopedSlots`. Related to [RFC0006]
- [#1178](https://togithub.com/vuejs/eslint-plugin-vue/issues/1178) Added `vue/require-slots-as-functions` rule enforces the properties of $slots to be used as a function. Related to [RFC0006]
- [#1211](https://togithub.com/vuejs/eslint-plugin-vue/issues/1211) Added `vue/no-deprecated-destroyed-lifecycle` rule reports use of deprecated `destroyed` and `beforeDestroy` lifecycle hooks.
- [#1253](https://togithub.com/vuejs/eslint-plugin-vue/issues/1253) Added `vue/valid-v-is` rule that reports wrong usage of `v-is` directives.
- [#1289](https://togithub.com/vuejs/eslint-plugin-vue/issues/1289) Added `vue/no-v-for-template-key-on-child` rule that reports the key of the `` placed on the child elements.
- [#1302](https://togithub.com/vuejs/eslint-plugin-vue/issues/1302) Added `vue/no-deprecated-props-default-this` rule that reports the use of `this` within the props default value factory functions.
- [#1303](https://togithub.com/vuejs/eslint-plugin-vue/issues/1303) Added `vue/experimental-script-setup-vars` rule that prevent variables defined in ` Githubissues.
Githubissues is a development platform for aggregating issues.
This PR contains the following updates:
6.2.2
->7.0.1
Release Notes
vuejs/eslint-plugin-vue
### [`v7.0.1`](https://togithub.com/vuejs/eslint-plugin-vue/releases/v7.0.1) [Compare Source](https://togithub.com/vuejs/eslint-plugin-vue/compare/v7.0.0...v7.0.1) #### 🐛 Bug Fixes - [#1317](https://togithub.com/vuejs/eslint-plugin-vue/issues/1317) Avoid redundant global self-require of the plugin. * * * **All commits:** [v7.0.0 -> v7.0.1](https://togithub.com/vuejs/eslint-plugin-vue/compare/v7.0.0...v7.0.1) ### [`v7.0.0`](https://togithub.com/vuejs/eslint-plugin-vue/releases/v7.0.0) [Compare Source](https://togithub.com/vuejs/eslint-plugin-vue/compare/v6.2.2...v7.0.0) #### :rocket: Highlight - Support for Vue.js 3.0 "One Piece". - Support for ESLint 7.x. - Support for ECMAScript 2020. - Added 66 new rules. #### 💥 Breaking Changes - [#1209](https://togithub.com/vuejs/eslint-plugin-vue/issues/1209) Change support version of ESLint from 6.0.0 to 6.2.0. - Updated presets configs. - Changed `plugin:vue/base` config. - [#1237](https://togithub.com/vuejs/eslint-plugin-vue/issues/1237) Removed `jsx:true` from shareable configs. - [#1209](https://togithub.com/vuejs/eslint-plugin-vue/issues/1209) Changed `parserOptions.ecmaVersion` to 2020. - [#1303](https://togithub.com/vuejs/eslint-plugin-vue/issues/1303) Added `vue/experimental-script-setup-vars` rule. - Changed `plugin:vue/essential` config. - Same changes as above. - [#1036](https://togithub.com/vuejs/eslint-plugin-vue/issues/1036) Added `vue/valid-v-bind-sync` rule. - [#1036](https://togithub.com/vuejs/eslint-plugin-vue/issues/1036) Added `vue/valid-v-slot` rule. - [#1036](https://togithub.com/vuejs/eslint-plugin-vue/issues/1036) Added `vue/no-custom-modifiers-on-v-model` rule. - [#1036](https://togithub.com/vuejs/eslint-plugin-vue/issues/1036) Added `vue/no-multiple-template-root` rule. - [#1036](https://togithub.com/vuejs/eslint-plugin-vue/issues/1036) Added `vue/no-v-model-argument` rule. - [#1148](https://togithub.com/vuejs/eslint-plugin-vue/issues/1148) Added `vue/no-mutating-props` rule. - [#1156](https://togithub.com/vuejs/eslint-plugin-vue/issues/1156) Added `vue/no-arrow-functions-in-watch` rule. - [#1166](https://togithub.com/vuejs/eslint-plugin-vue/issues/1166) Added `vue/custom-event-name-casing` rule. - [#1239](https://togithub.com/vuejs/eslint-plugin-vue/issues/1239) Added `vue/no-dupe-v-else-if` rule. - [#1281](https://togithub.com/vuejs/eslint-plugin-vue/issues/1281) Added `vue/no-v-for-template-key` rule. - Changed `plugin:vue/strongly-recommended` config. - Same changes as above. - [#1036](https://togithub.com/vuejs/eslint-plugin-vue/issues/1036) Added `vue/component-definition-name-casing` rule. - [#1036](https://togithub.com/vuejs/eslint-plugin-vue/issues/1036) Added `vue/v-slot-style` rule. - [#1036](https://togithub.com/vuejs/eslint-plugin-vue/issues/1036) Removed `vue/name-property-casing` rule. - [#1149](https://togithub.com/vuejs/eslint-plugin-vue/issues/1149) Added `vue/one-component-per-file` rule. - Changed `plugin:vue/recommended` config. - Same changes as above. - [#1036](https://togithub.com/vuejs/eslint-plugin-vue/issues/1036) Added `vue/component-tags-order` rule. - [#1179](https://togithub.com/vuejs/eslint-plugin-vue/issues/1179) Added `vue/no-multiple-slot-args` rule. - [#1238](https://togithub.com/vuejs/eslint-plugin-vue/issues/1238) Added `vue/no-lone-template` rule. - [#1036](https://togithub.com/vuejs/eslint-plugin-vue/issues/1036) Changed `vue/name-property-casing` rule to be deprecate. - [#1120](https://togithub.com/vuejs/eslint-plugin-vue/issues/1120) Added the support of descriptions in directive comments. - [#1120](https://togithub.com/vuejs/eslint-plugin-vue/issues/1120) Added the support for block-level directive comments. - Changed the default order option for `vue/order-in-components` rule. - Add options for Vue.js 3.x. - [#1181](https://togithub.com/vuejs/eslint-plugin-vue/issues/1181) `emits` to after `props`. - [#1181](https://togithub.com/vuejs/eslint-plugin-vue/issues/1181) `setup` to after `emits`. - [#1181](https://togithub.com/vuejs/eslint-plugin-vue/issues/1181) `beforeUnmount` and `unmounted` to LIFECYCLE_HOOKS. - [#1181](https://togithub.com/vuejs/eslint-plugin-vue/issues/1181) `renderTracked` and `renderTriggered` to LIFECYCLE_HOOKS. - Add options for Vue.js 2.x. - [#1181](https://togithub.com/vuejs/eslint-plugin-vue/issues/1181) `provide` and `inject` to after `mixins`. - [#1181](https://togithub.com/vuejs/eslint-plugin-vue/issues/1181) `errorCaptured` to LIFECYCLE_HOOKS. - Add options for Vue Router. - [#1107](https://togithub.com/vuejs/eslint-plugin-vue/issues/1107) ROUTER_GUARDS (`beforeRouteEnter`, `beforeRouteUpdate` and `beforeRouteLeave`) to after `provide / inject` (`provide / inject` was added after `mixins`). - Add options for Nuxt. - [#1107](https://togithub.com/vuejs/eslint-plugin-vue/issues/1107) `key` to after `name`. - [#1107](https://togithub.com/vuejs/eslint-plugin-vue/issues/1107) `layout`, `middleware`, `validate`, `scrollToTop`, `transition`, `loading` to after ROUTER_GUARDS (ROUTER_GUARDS was added after `provide / inject`). - [#1107](https://togithub.com/vuejs/eslint-plugin-vue/issues/1107) `watchQuery` to after `watch`. - Change options for Nuxt. - [#1107](https://togithub.com/vuejs/eslint-plugin-vue/issues/1107) `head` move from after `methods` to after `data`. - [#1268](https://togithub.com/vuejs/eslint-plugin-vue/issues/1268) `fetch` move from after `props / propsData` to after `data`. #### ✨ Enhancements ##### Core: - [#1120](https://togithub.com/vuejs/eslint-plugin-vue/issues/1120) Added the support of descriptions in directive comments. - [#1120](https://togithub.com/vuejs/eslint-plugin-vue/issues/1120) Added the support for block-level directive comments. - [#1073](https://togithub.com/vuejs/eslint-plugin-vue/issues/1073), [#1088](https://togithub.com/vuejs/eslint-plugin-vue/issues/1088) Updated the rules of this plugin to detect Vue.js 3.x components. - [#1064](https://togithub.com/vuejs/eslint-plugin-vue/issues/1064) Updated the rules of this plugin to be able to analyze the arrow function component options. - [#1152](https://togithub.com/vuejs/eslint-plugin-vue/issues/1152) Changed casing conversion logic to behave like Vue core logic. - Changed `plugin:vue/essential` config. - Changed `plugin:vue/strongly-recommended` config. - Changed `plugin:vue/recommended` config. ##### New Rulesets: - Added `plugin:vue/vue3-essential` config. - Added `plugin:vue/vue3-strongly-recommended` config. - Added `plugin:vue/vue3-recommended` config. ##### New Rules: ##### for Vue.js 3.x: - [#1039](https://togithub.com/vuejs/eslint-plugin-vue/issues/1039) Added `vue/no-deprecated-v-bind-sync` rule that reports when deprecated `.sync` modifier is used on `v-bind` directive. Related to [RFC0005] - [#1043](https://togithub.com/vuejs/eslint-plugin-vue/issues/1043) Added `vue/no-deprecated-filter` rule that reports usage of filters syntax removed in Vue.js 3.0.0+. Related to [RFC0015] - [#1065](https://togithub.com/vuejs/eslint-plugin-vue/issues/1065) Added `vue/no-ref-as-operand` rule that reports cases where a ref is used incorrectly as an operand. Related to [RFC0013] - [#1066](https://togithub.com/vuejs/eslint-plugin-vue/issues/1066) Added `vue/no-setup-props-destructure` rule that reports the destructuring of props passed to setup causing the value to lose reactivity. Related to [RFC0013] - [#1067](https://togithub.com/vuejs/eslint-plugin-vue/issues/1067) Added `vue/no-lifecycle-after-await` rule that reports the lifecycle hooks after await expression. Related to [RFC0013] - [#1079](https://togithub.com/vuejs/eslint-plugin-vue/issues/1079) Added `vue/no-deprecated-v-on-number-modifiers` rule that reports use of deprecated `KeyboardEvent.keyCode` modifier on `v-on` directive. Related to [RFC0014] - [#1083](https://togithub.com/vuejs/eslint-plugin-vue/issues/1083) Added `vue/no-deprecated-data-object-declaration` rule that reports use of deprecated object declaration on `data` property. Related to [RFC0019] - [#1097](https://togithub.com/vuejs/eslint-plugin-vue/issues/1097) Added `vue/no-deprecated-events-api` rule that reports use of deprecated `$on`, `$off` and `$once` api (removed in Vue.js v3.0.0+). Related to [RFC0020] - [#1068](https://togithub.com/vuejs/eslint-plugin-vue/issues/1068) Added `vue/no-watch-after-await` rule that reports the `watch()` after `await` expression. [RFC0013] - [#1099](https://togithub.com/vuejs/eslint-plugin-vue/issues/1099), [#1105](https://togithub.com/vuejs/eslint-plugin-vue/issues/1105) Added `vue/require-toggle-inside-transition` rule that reports elements inside `