Releases: vuejs/eslint-plugin-vue
Releases Β· vuejs/eslint-plugin-vue
v9.0.0
π₯ Breaking Changes
- #1847 Drop support for Node.js v12.
- #1846 Change default casing of
vue/custom-event-name-casing
rule tocamelCase
. - #1883 Potentially breaking bug fix: Enable
vue/html-closing-bracket-spacing
andvue/html-closing-bracket-newline
rules for top-level tags. - #1848, #1892 Change presets configs and remove unused internal methods. (see below)
- #1849 Upgrade vue-eslint-parser to v9. (see below)
- #1881 Remove deprecated rules. (see below)
Change Vue 3 presets configs
- Change
plugin:vue/vue3-essential
config:- Add
vue/no-child-content
rule - Add
vue/no-expose-after-await
rule - Add
vue/no-reserved-component-names
rule - Add
vue/no-use-computed-property-like-method
rule - Add
vue/no-v-text-v-html-on-component
rule - Add
vue/prefer-import-from-vue
rule - Add
vue/valid-attribute-name
rule
- Add
- Change
plugin:vue/vue3-strongly-recommended
config:- Same changes as above
- Change
plugin:vue/vue3-recommended
config:- Same changes as above
Change Vue 2 preset configs
- Change
plugin:vue/essential
config:- Add
vue/no-child-content
rule - Add
vue/no-reserved-component-names
rule - Add
vue/no-use-computed-property-like-method
rule - Add
vue/no-v-text-v-html-on-component
rule - Add
vue/valid-attribute-name
rule - Add
vue/valid-model-definition
rule - Add
vue/no-export-in-script-setup
rule * - Add
vue/no-ref-as-operand
rule * - Add
vue/no-setup-props-destructure
rule * - Add
vue/return-in-emits-validator
rule * - Add
vue/valid-define-emits
rule * - Add
vue/valid-define-props
rule *
- Add
- Change
plugin:vue/strongly-recommended
config:- Same changes as above
- Change
plugin:vue/recommended
config:- Same changes as above
Note: The rules marked with * are now included in the plugin:vue/essential
config because @vue/composition-api and unplugin-vue2-script-setup add (limited) support for these Vue 3 features in Vue 2. If you don't use those libraries, enabling these rules shouldn't affect you.
Deprecated features
vue/no-invalid-model-keys
rule is now deprecated, as it's renamed tovue/valid-model-definition
vue/script-setup-uses-vars
rule is now deprecated, as it's no longer needed with the upgrade to vue-eslint-parser to v9vue/setup-compiler-macros
environment is now deprecated, as it's no longer needed with the upgrade to vue-eslint-parser to v9
Removed features
Previously deprecated rules are removed completely:
vue/experimental-script-setup-vars
rule (deprecated in v7.13.0): not needed anymorevue/name-property-casing
rule (deprecated in v7.0.0): usevue/component-definition-name-casing
insteadvue/no-confusing-v-for-v-if
rule (deprecated in v5.0.0): usevue/no-use-v-if-with-v-for
insteadvue/no-unregistered-components
rule (deprecated in v8.4.0): usevue/no-undef-components
instead
Previously deprecated internal util methods are removed completely:
getComponentProps
: usegetComponentPropsFromOptions
insteadgetComponentEmits
: usegetComponentEmitsFromOptions
instead
β¨ Enhancements
- #1874 Make
vue/match-component-file-name
rule fixable via editor suggestions. - #1885 Support
<script setup>
invue/no-expose-after-await
rule. - #1851, #1892 Add
vue/valid-attribute-name
rule.
π Bug Fixes
- #1861 Fix wrong behavior of
vue/define-macros-order
rule when there are multiple<script>
tags. - #1883 Potentially breaking bug fix: Enable
vue/html-closing-bracket-spacing
andvue/html-closing-bracket-newline
rules for top-level tags.
Full Changelog: v8.7.0...v9.0.0
v8.7.1
π Bug Fixes
- #1861 Fixed false positives for multiple scripts in
vue/define-macros-order
rule.
Full Changelog: v8.7.0...v8.7.1
v8.7.0
β¨ Enhancements
- #1825, #1842 Added support for CSS selectors to order option for
vue/component-tags-order
rule. - #1831 Added
vue/match-component-import-name
rule that requires the registered component name to match the imported component name. - #1856 Added
vue/define-macros-order
rule that enforces the order ofdefineEmits
anddefineProps
compiler macros.
π Bug Fixes
- #1844 Fixed false negatives for
<script setup>
invue/multi-word-component-names
rule. - #1854 Fixed false positives for
<script setup>
with TS literal type invue/require-valid-default-prop
rule.
Full Changelog: v8.6.0...v8.7.0
v8.6.0
β¨ Enhancements
- #1811 Made
vue/component-tags-order
rule auto-fixable. - #1822 Added
vue/prefer-prop-type-boolean-first
rule that enforces thatBoolean
comes first in component prop types - #1820 Added
vue/no-restricted-html-elements
rule that disallows specific HTML elements.
π Bug Fixes
- #1826 Fixed false negatives for
<slot>
invue/attribute-hyphenation
rule.
Full Changelog: v8.5.0...v8.6.0
v8.5.0
β¨ Enhancements
- #1796 Added
prefer-true-attribute-shorthand
rule that forces thev-bind
attribute withtrue
value to use the shorthand. - #1804 Added
vue/prefer-import-from-vue
rule that aims to use imports from'vue'
instead of imports from'@vue/*'
.
Full Changelog: v8.4.1...v8.5.0
v8.4.1
π Bug Fixes
- #1782 Support template literal component names in
vue/no-undef-components
rule. - #1790 Fixed false positives due to conflicts with other rules in
vue/no-unused-properties
rule.
Full Changelog: v8.4.0...v8.4.1
v8.4.0
β¨ Enhancements
- #1760 Added
vue/no-v-text-v-html-on-component
rule that disallows the use ofv-text
/v-html
on component. - #1762 Added
vue/object-shorthand
rule that appliesobject-shorthand
rule to expressions in<template>
. - #1763 Added
vue/no-undef-components
rule that warns reports component that are used in the<template>
, but that are not defined in the<script setup>
or the Options API'scomponents
section. - #1769 Added
vue/quote-props
rule that appliesquote-props
rule to expressions in<template>
. - #1761 Added support for Vue2 functional component to
vue/no-unused-properties
rule. - #1761 Added support for Vue2 functional component to
vue/no-undef-properties
rule.
π Bug Fixes
- #1770 Fixed false positives for import brace in
vue/script-indent
rule. - #1771 Fixed false positives for
v-bind="obj"
withv-model
invue/attributes-order
rule. - #1775 Fixed false positives for CSS
v-bind()
invue/no-extra-parens
rule. - #1777 Skip conditional expressions in
vue/valid-next-tick
rule.
βοΈ Updates
- #1763 Deprecated
vue/no-unregistered-components
rule.
Full Changelog: v8.3.0...v8.4.0
v8.3.0
π Bug Fixes
- #1755 Fix crash on
<textarea>
without end tag invue/html-indent
rule. - #1756 Fix false positive for unknown emits definition in
vue/require-explicit-emits
rule.
βοΈ Updates
Full Changelog: v8.2.0...v8.3.0
v8.2.0
β¨ Enhancements
- #1725 Added
vue/component-options-name-casing
rule that enforces the casing of component name incomponents
options. - #1729 Added
vue/prefer-separate-static-class
rule that requires static class names in template to be in a separateclass
attribute.
π Bug Fixes
- #1736 Fixed false positives for import binding in
vue/valid-define-emits
andvue/valid-define-props
rules.
βοΈ Updates
- #1719 Added support for TypeScript 4.5 to
vue/script-indent
rule. - #1735 Changed to allow
asyncData
invue/no-dupe-keys
rule.
Full Changelog: v8.1.1...v8.2.0