Releases: vuejs/eslint-plugin-vue
Releases · vuejs/eslint-plugin-vue
v9.3.0
⚙️ Updates
- #1934 Added support for
<script setup>tovue/component-name-in-template-casingrule.
🐛 Bug Fixes
- #1937 Fixed false negatives for template literals in
vue/custom-event-name-casing,vue/no-restricted-custom-event, andvue/require-explicit-emitsrules.
Full Changelog: v9.2.0...v9.3.0
v9.2.0
⚙️ Updates
- #1917 Added support for Vue 2.7 to
vue/no-unsupported-featuresrule.
Full Changelog: v9.1.1...v9.2.0
v9.1.1
🐛 Bug Fixes
- #1909 Fixed false negatives in
vue/no-unused-componentsrule
Full Changelog: v9.1.0...v9.1.1
v9.1.0
🐛 Bug Fixes
- #1907 Fixed
vue/prefer-import-from-vuerule to skip side-effect imports in.d.tsfiles.
Full Changelog: v9.0.1...v9.1.0
v9.0.1
🐛 Bug Fixes
- #1896 Fixed false positive for script setup in
vue/no-expose-after-awaitrule
Full Changelog: 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-casingrule tocamelCase. - #1883 Potentially breaking bug fix: Enable
vue/html-closing-bracket-spacingandvue/html-closing-bracket-newlinerules 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-essentialconfig:- Add
vue/no-child-contentrule - Add
vue/no-expose-after-awaitrule - Add
vue/no-reserved-component-namesrule - Add
vue/no-use-computed-property-like-methodrule - Add
vue/no-v-text-v-html-on-componentrule - Add
vue/prefer-import-from-vuerule - Add
vue/valid-attribute-namerule
- Add
- Change
plugin:vue/vue3-strongly-recommendedconfig:- Same changes as above
- Change
plugin:vue/vue3-recommendedconfig:- Same changes as above
Change Vue 2 preset configs
- Change
plugin:vue/essentialconfig:- Add
vue/no-child-contentrule - Add
vue/no-reserved-component-namesrule - Add
vue/no-use-computed-property-like-methodrule - Add
vue/no-v-text-v-html-on-componentrule - Add
vue/valid-attribute-namerule - Add
vue/valid-model-definitionrule - Add
vue/no-export-in-script-setuprule * - Add
vue/no-ref-as-operandrule * - Add
vue/no-setup-props-destructurerule * - Add
vue/return-in-emits-validatorrule * - Add
vue/valid-define-emitsrule * - Add
vue/valid-define-propsrule *
- Add
- Change
plugin:vue/strongly-recommendedconfig:- Same changes as above
- Change
plugin:vue/recommendedconfig:- 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-keysrule is now deprecated, as it's renamed tovue/valid-model-definitionvue/script-setup-uses-varsrule is now deprecated, as it's no longer needed with the upgrade to vue-eslint-parser to v9vue/setup-compiler-macrosenvironment 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-varsrule (deprecated in v7.13.0): not needed anymorevue/name-property-casingrule (deprecated in v7.0.0): usevue/component-definition-name-casinginsteadvue/no-confusing-v-for-v-ifrule (deprecated in v5.0.0): usevue/no-use-v-if-with-v-forinsteadvue/no-unregistered-componentsrule (deprecated in v8.4.0): usevue/no-undef-componentsinstead
Previously deprecated internal util methods are removed completely:
getComponentProps: usegetComponentPropsFromOptionsinsteadgetComponentEmits: usegetComponentEmitsFromOptionsinstead
✨ Enhancements
- #1874 Make
vue/match-component-file-namerule fixable via editor suggestions. - #1885 Support
<script setup>invue/no-expose-after-awaitrule. - #1851, #1892 Add
vue/valid-attribute-namerule.
🐛 Bug Fixes
- #1861 Fix wrong behavior of
vue/define-macros-orderrule when there are multiple<script>tags. - #1883 Potentially breaking bug fix: Enable
vue/html-closing-bracket-spacingandvue/html-closing-bracket-newlinerules 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-orderrule.
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-orderrule. - #1831 Added
vue/match-component-import-namerule that requires the registered component name to match the imported component name. - #1856 Added
vue/define-macros-orderrule that enforces the order ofdefineEmitsanddefinePropscompiler macros.
🐛 Bug Fixes
- #1844 Fixed false negatives for
<script setup>invue/multi-word-component-namesrule. - #1854 Fixed false positives for
<script setup>with TS literal type invue/require-valid-default-proprule.
Full Changelog: v8.6.0...v8.7.0
v8.6.0
✨ Enhancements
- #1811 Made
vue/component-tags-orderrule auto-fixable. - #1822 Added
vue/prefer-prop-type-boolean-firstrule that enforces thatBooleancomes first in component prop types - #1820 Added
vue/no-restricted-html-elementsrule that disallows specific HTML elements.
🐛 Bug Fixes
- #1826 Fixed false negatives for
<slot>invue/attribute-hyphenationrule.
Full Changelog: v8.5.0...v8.6.0
v8.5.0
✨ Enhancements
- #1796 Added
prefer-true-attribute-shorthandrule that forces thev-bindattribute withtruevalue to use the shorthand. - #1804 Added
vue/prefer-import-from-vuerule that aims to use imports from'vue'instead of imports from'@vue/*'.
Full Changelog: v8.4.1...v8.5.0