Update dependency eslint-plugin-vue to v9
This MR contains the following updates:
Package | Type | Update | Change |
---|---|---|---|
eslint-plugin-vue (source) | devDependencies | major | ^7.12.1 -> ^9.0.0 |
Release Notes
vuejs/eslint-plugin-vue
v9.6.0
✨ Enhancements
-
#1943 Added
vue/no-required-prop-with-default
rule that enforces props with default values to be optional. -
#1982 Added
consistent
option tovue/padding-line-between-tags
rule.
🐛 Bug Fixes
-
#1988 Fixed false positives for uninitialized vars in
vue/no-ref-as-operand
rule.
Full Changelog: https://github.com/vuejs/eslint-plugin-vue/compare/v9.5.1...v9.6.0
v9.5.1
🐛 Bug Fixes
-
#1976 Fixed false positives for
<script setup>
with TypeScript invue/no-undef-components
rule.
Full Changelog: https://github.com/vuejs/eslint-plugin-vue/compare/v9.5.0...v9.5.1
v9.5.0
✨ Enhancements
-
#1965 Added
vue/no-ref-object-destructure
rule that reports the destructuring of ref objects causing the value to lose reactivity. -
#1967 Changed
vue/no-undef-components
rule to report when type-only imports are used. -
#1966 Added
vue/padding-line-between-tags
rule that requires or disallows newlines between sibling tags in template. -
#1968 Added
vue/define-emits-declaration
rule that enforces the declaration style ofdefineEmits
. -
#1968 Added
vue/define-props-declaration
rule that enforces the declaration style ofdefineProps
.
⚙ ️ Updates
-
#1955 Changed
vue/order-in-components
rule to be auto-fixable even when usingPropType
.
Full Changelog: https://github.com/vuejs/eslint-plugin-vue/compare/v9.4.0...v9.5.0
Thanks @dev1437, @Amorites, @acupofspirt for your contributions!
v9.4.0
🐛 Bug Fixes
-
#1942 Fixed false negatives for delete operation in
vue/no-mutating-props
rule
Full Changelog: https://github.com/vuejs/eslint-plugin-vue/compare/v9.3.0...v9.4.0
v9.3.0
⚙ ️ Updates
-
#1934 Added support for
<script setup>
tovue/component-name-in-template-casing
rule.
🐛 Bug Fixes
-
#1937 Fixed false negatives for template literals in
vue/custom-event-name-casing
,vue/no-restricted-custom-event
, andvue/require-explicit-emits
rules.
Full Changelog: https://github.com/vuejs/eslint-plugin-vue/compare/v9.2.0...v9.3.0
v9.2.0
⚙ ️ Updates
-
#1917 Added support for Vue 2.7 to
vue/no-unsupported-features
rule.
Full Changelog: https://github.com/vuejs/eslint-plugin-vue/compare/v9.1.1...v9.2.0
v9.1.1
🐛 Bug Fixes
-
#1909 Fixed false negatives in
vue/no-unused-components
rule
Full Changelog: https://github.com/vuejs/eslint-plugin-vue/compare/v9.1.0...v9.1.1
v9.1.0
🐛 Bug Fixes
-
#1907 Fixed
vue/prefer-import-from-vue
rule to skip side-effect imports in.d.ts
files.
Full Changelog: https://github.com/vuejs/eslint-plugin-vue/compare/v9.0.1...v9.1.0
v9.0.1
🐛 Bug Fixes
-
#1896 Fixed false positive for script setup in
vue/no-expose-after-await
rule
Full Changelog: https://github.com/vuejs/eslint-plugin-vue/compare/v9.0.0...v9.0.1
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 v9 -
vue/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 anymore -
vue/name-property-casing
rule (deprecated in v7.0.0): usevue/component-definition-name-casing
instead -
vue/no-confusing-v-for-v-if
rule (deprecated in v5.0.0): usevue/no-use-v-if-with-v-for
instead -
vue/no-unregistered-components
rule (deprecated in v8.4.0): usevue/no-undef-components
instead
Previously deprecated internal util methods are removed completely:
-
getComponentProps
: usegetComponentPropsFromOptions
instead -
getComponentEmits
: 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: https://github.com/vuejs/eslint-plugin-vue/compare/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: https://github.com/vuejs/eslint-plugin-vue/compare/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: https://github.com/vuejs/eslint-plugin-vue/compare/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: https://github.com/vuejs/eslint-plugin-vue/compare/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: https://github.com/vuejs/eslint-plugin-vue/compare/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: https://github.com/vuejs/eslint-plugin-vue/compare/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: https://github.com/vuejs/eslint-plugin-vue/compare/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: https://github.com/vuejs/eslint-plugin-vue/compare/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: https://github.com/vuejs/eslint-plugin-vue/compare/v8.1.1...v8.2.0
v8.1.1
🐛 Bug Fixes
-
#1721 Fixed crash in
vue/component-api-style
rule.
Full Changelog: https://github.com/vuejs/eslint-plugin-vue/compare/v8.1.0...v8.1.1
v8.1.0
✨ Enhancements
-
#1707 Added
vue/no-child-content
rule that reports child content of elements that have a directive which overwrites that child content. -
#1712 Added
vue/no-expose-after-await
rule that reports theexpose()
afterawait
expression. -
#1703 Added
composition-vue2
style option invue/component-api-style
rule.
🐛 Bug Fixes
-
#1713 Fixed false positives for type-only exports in
vue/no-export-in-script-setup
rule. -
#1715 Fixed false negatives for
v-bind.sync
invue/no-mutating-props
rule. -
#1715 Fixed false positives for shadowed props in
vue/no-mutating-props
rule. - #1718 Fixed memory leak.
Full Changelog: https://github.com/vuejs/eslint-plugin-vue/compare/v8.0.3...v8.1.0
v8.0.3
🐛 Bug Fixes
-
#1691 Upgrade vue-eslint-parser to use patch.
It upgrade fixes the wrong location in multiple
<script>
Full Changelog: https://github.com/vuejs/eslint-plugin-vue/compare/v8.0.2...v8.0.3
v8.0.2
🐛 Bug Fixes
-
#1689 Fixed false positive for filename in
vue/multi-word-component-names
rule
Full Changelog: https://github.com/vuejs/eslint-plugin-vue/compare/v8.0.1...v8.0.2
v8.0.1
🐛 Bug Fixes
-
#1686 Fixed false positives for arrow return in
vue/valid-next-tick
rule.
Full Changelog: https://github.com/vuejs/eslint-plugin-vue/compare/v8.0.0...v8.0.1
v8.0.0
💥 Breaking Changes
- #1588 Dropped supports Node.js v8-10, v13 and v15.
- #1664 Upgraded vue-eslint-parser to v8.0.0.
- Changed presets configs.
- Changed
plugin:vue/vue3-essential
config.-
#1603 Added
vue/no-deprecated-v-is
rule. -
#1603 Added
vue/no-export-in-script-setup
rule. -
#1603 Added
vue/valid-define-emits
rule. -
#1603 Added
vue/valid-define-props
rule. -
#1603 Added
vue/valid-next-tick
rule. -
#1603 Added
vue/valid-v-memo
rule. -
#1603 Added
vue/no-useless-template-attributes
rule. -
#1603 Added
vue/no-computed-properties-in-data
rule. -
#1603 Added
vue/multi-word-component-names
rule. -
#1603 Added
vue/no-deprecated-router-link-tag-prop
rule. -
#1678 Added
vue/no-reserved-props
rule.
-
#1603 Added
- Changed
plugin:vue/vue3-strongly-recommended
config.- Same changes as above.
-
#1603 Added
vue/v-on-event-hyphenation
rule. -
#1587 Added
vue/first-attribute-linebreak
rule.
- Changed
plugin:vue/vue3-recommended
config.- Same changes as above.
- Changed
plugin:vue/essential
config. - Changed
plugin:vue/strongly-recommended
config.- Same changes as above.
-
#1587 Added
vue/first-attribute-linebreak
rule.
- Changed
plugin:vue/recommended
config.- Same changes as above.
- Changed
-
#1587 Removed the
allowFirstLine
option of thevue/max-attributes-per-line
rule.
✨ Enhancements
Core:
-
#1685 Added
setup-compiler-macros
environment.
Rules:
-
#1587 Added
vue/first-attribute-linebreak
rule aims to enforce a consistent location for the first attribute. -
#1678 Added
vue/no-reserved-props
rule that disallow reserved names to be used in props. -
#1680 Added
vue/no-loss-of-precision
rule that appliesno-loss-of-precision
rule to expressions in<template>
. -
#1681 Added
ignore
option tovue/multi-word-component-names
rule. -
#1679 Added support for Nuxt.js's
asyncData
invue/no-dupe-keys
,vue/no-reserved-keys
,vue/no-template-shadow
,vue/no-undef-properties
, andvue/no-unused-properties
rules.
🐛 Bug Fixes
-
#1684 Fixed false positives for non-vue file in
vue/multi-word-component-names
rule.
Full Changelog: https://github.com/vuejs/eslint-plugin-vue/compare/v7.20.0...v8.0.0
v7.20.0
✨ Enhancements
-
#1472 Added
vue/no-undef-properties
rule that warns of using undefined properties. -
#1653 Added
vue/no-computed-properties-in-data
rule that disallow accessing computed properties indata()
. -
#1659 Improved
vue/no-use-computed-property-like-method
rule reports. -
#1661 Added
vue/multi-word-component-names
rule to enforce multiple words in component names. -
#1663 Added
vue/no-deprecated-router-link-tag-prop
rule that disallow using deprecatedtag
property on<RouterLink>
.
🐛 Bug Fixes
-
#1659 Fixed crash in
vue/no-use-computed-property-like-method
rule. -
#1658 Fixed false positives for vars inside types in
vue/valid-define-emits
andvue/valid-define-props
rules.
⚙ ️ Updates
-
#1654 Changed peer deps eslint ver from
^6.2.0 || ^7.0.0 || ^8.0.0-0
to^6.2.0 || ^7.0.0 || ^8.0.0
.
Full Changelog: https://github.com/vuejs/eslint-plugin-vue/compare/v7.19.1...v7.20.0
v7.19.1
🐛 Bug Fixes
- [
83eab8d
] Fixed false positives for vars inside functions invue/valid-define-emits
andvue/valid-define-props
rules. Picked from #1652
Full Changelog: https://github.com/vuejs/eslint-plugin-vue/compare/v7.19.0...v7.19.1
v7.19.0
✨ Enhancements
-
#1639 Added
vue/no-restricted-class
rule that reports the classes you don't want to allow in the template. -
#1644 Added
vue/no-useless-template-attributes
rule that disallow useless attribute on<template>
tags.
🐛 Bug Fixes
-
#1647 Fixed false positives for toRefs in
vue/no-unused-properties
rule. -
#1648 Fixed unable to autofix event name with
update:
.
All commits: v7.18.0 -> v7.19.0
v7.18.0
✨ Enhancements
-
#1626 Added
vue/component-api-style
rule that aims to make the API style you use to define Vue components consistent in your project.
⚙ ️ Updates
-
#1619 Updated
vue/script-indent
rule to support Class static block and typescript-eslint v5(rc) -
#1620 Changed type determination logic of type-only
defineProps
to follow vue v3.2.9.
All commits: v7.17.0 -> v7.18.0
v7.17.0
✨ Enhancements
-
#1605 Added
vue/no-v-text
rule that disallowv-text
directive.
⚙ Updates
- #1607, #1610 Added support for ESLint v8 (beta). Note that ESLint v8 beta support will be removed without notice once a stable version of ESLint v8 is released.
All commits: v7.16.0 -> v7.17.0
v7.16.0
✨ Enhancements
-
#1596 Added
vue/valid-v-memo
rule that enforce validv-memo
directives. -
#1599 Updated
vue/no-unsupported-features
rule to support Vue 3.2 syntaxes.
🐛 Bug Fixes
-
#1602 Fixed false positives for namespace component in
vue/script-setup-uses-vars
rule.
⚙ Updates
-
#1598 Updated
vue/no-restricted-v-bind
andvue/valid-v-bind
rules to supportattr
modifier.
All commits: v7.15.2 -> v7.16.0
v7.15.2
🐛 Bug Fixes
-
#1600 Fixed false positives in
vue/no-use-computed-property-like-method
rule.
All commits: v7.15.1 -> v7.15.2
v7.15.1
🐛 Bug Fixes
-
#1590 Fixed message typo in
vue/no-reserved-keys
rule. -
#1591 Fixed false positives for type-only defineProps in
vue/require-default-prop
rule.
All commits: v7.15.0 -> v7.15.1
v7.15.0
✨ Enhancements
-
#1234 Added
vue/no-use-computed-property-like-method
rule that disallows to use computed property like method. -
#1586 Added
vue/block-lang
rule rule that disallows the use of languages other than those available in the your application for thelang
attribute of block elements. -
#1576 Updated some rules to support style CSS variable injection.
-
vue/comma-spacing
rule. -
vue/dot-notation
rule. -
vue/eqeqeq
rule. -
vue/func-call-spacing
rule. -
vue/no-extra-parens
rule. -
vue/no-restricted-syntax
rule. -
vue/no-useless-concat
rule. -
vue/prefer-template
rule. -
vue/space-in-parens
rule. -
vue/space-infix-ops
rule. -
vue/space-unary-ops
rule. -
vue/template-curly-spacing
rule.
-
🐛 Bug Fixes
-
#1584 Fixed false positives for call expression in
vue/no-mutating-props
rule.
⚙ Updates
- #1576 Upgraded vue-eslint-parser.
All commits: v7.14.0 -> v7.15.0
v7.14.0
✨ Enhancements
-
#1568 Added
vue/require-expose
rule that enforces the component to explicitly declare the exposed properties to the component usingexpose
. -
#1566 Updated
vue/no-unused-properties
rule to supportexpose
-
#1574 Updated some rules to support style CSS vars injection.
-
vue/no-parsing-error
rule. -
vue/no-unused-properties
rule. -
vue/script-setup-uses-vars
rule. -
vue/no-unsupported-features
rule.
-
-
#1565 Improved report location of
vue/valid-v-xxx
rules.
🐛 Bug Fixes
-
#1569 Fixed false positives for
<script setup>
invue/no-lifecycle-after-await
rule. -
#1569 Fixed false positives for
<script setup>
invue/no-watch-after-await
rule. -
#1569 Fixed false positives for
<script setup>
invue/no-restricted-call-after-await
rule. -
#1575 Downgraded to
semver
compatible with Node v8.
All commits: v7.13.0 -> v7.14.0
v7.13.0
✨ Enhancements
- Supports
<script setup>
-
#1529 Added
vue/script-setup-uses-vars
rule that will find variables in<script setup>
used in<template>
and mark them as used. -
#1559 Added
vue/no-export-in-script-setup
rule that disallows ES export in<script setup>
. -
#1560 Added
vue/valid-define-props
rule that reportsdefineProps
compiler macros in the following cases:-
defineProps
are referencing locally declared variables. -
defineProps
has both a literal type and an argument. e.g.defineProps<{/*props*/}>({/*props*/})
-
defineProps
has been called multiple times. - Props are defined in both
defineProps
andexport default {}
. - Props are not defined in either
defineProps
orexport default {}
.
-
-
#1561 Added
vue/valid-define-emits
rule that reportsdefineEmits
compiler macros in the following cases:-
defineEmits
are referencing locally declared variables. -
defineEmits
has both a literal type and an argument. e.g.defineEmits<(e: 'foo')=>void>(['bar'])
-
defineEmits
has been called multiple times. - Custom events are defined in both
defineEmits
andexport default {}
. - Custom events are not defined in either
defineEmits
orexport default {}
.
-
-
#1532, #1559 Upgraded
vue-eslint-parser
. - Updated rules to support
<script setup>
.-
#1531
vue/no-mutating-props
rule. -
#1535
vue/no-reserved-keys
rule. -
#1533
vue/no-async-in-computed-properties
rule. -
#1534
vue/no-side-effects-in-computed-properties
rule. -
#1536
vue/require-prop-type-constructor
rule. -
#1539
vue/no-lifecycle-after-await
rule. -
#1538
vue/require-valid-default-prop
rule. -
#1542
vue/return-in-emits-validator
rule. -
#1545
vue/require-default-prop
rule. -
#1540
vue/no-setup-props-destructure
rule. -
#1541
vue/no-watch-after-await
rule. -
#1543
vue/no-template-shadow
rule. -
#1544
vue/prop-name-casing
rule. -
#1546
vue/require-prop-types
rule. -
#1548
vue/require-explicit-emits
rule. -
#1549
vue/custom-event-name-casing
rule. -
#1550
vue/no-boolean-default
rule. -
#1551
vue/no-restricted-call-after-await
rule. -
#1552
vue/no-restricted-props
rule. -
#1553
vue/no-unregistered-components
rule. -
#1554
vue/no-unsupported-features
rule. -
#1555
vue/no-unused-properties
rule. -
#1556
vue/no-unused-refs
rule. -
#1557
vue/require-emit-validator
rule. -
#1558
vue/require-name-property
rule.
-
#1531
-
#1529 Added
-
#1543 Updated
vue/no-template-shadow
rule to supportsetup()
. -
#1556 Updated
vue/no-unused-refs
rule to supportsetup()
.
🐛 Bug Fixes
- #1527 Changed the indent rule so that the union type has the same indent as the binary expression.
⚙ ️ Updates
-
#1528 Deprecated
vue/experimental-script-setup-vars
rule.
All commits: v7.12.1 -> v7.13.0
Configuration
-
If you want to rebase/retry this MR, click this checkbox.
This MR has been generated by Renovate Bot.