版本发布 8
### Minor Changes - Added `"inject"` to `groups` option in [`vue/no-unused-properties`](https://eslint.vuejs.org/rules/no-unused-properties.html) rule ([#3052](https://github.com/vuejs/eslint-plugin-vue/pull/3052)) - Added new `ignores` option to [`vue/no-literals-in-template`](https://eslint.vuejs.org/rules/no-literals-in-template.html) rule ([#3072](https://github.com/vuejs/eslint-plugin-vue/pull/3072)) - Added support for `:single-line`/`:multi-line` pseudo-classes in [`vue/padding-line-between-tags`](https://eslint.vuejs.org/rules/padding-line-between-tags.html) ([#3025](https://github.com/vuejs/eslint-plugin-vue/pull/3025)) - Added new [`vue/prefer-v-model`](https://eslint.vuejs.org/rules/prefer-v-model.html) rule ([#3062](https://github.com/vuejs/eslint-plugin-vue/pull/3062)) - Added new [`vue/prefer-single-event-payload`](https://eslint.vuejs.org/rules/prefer-single-event-payload.html) rule ([#3058](https://github.com/vuejs/eslint-plugin-vue/pull/3058)) ### Patch Changes - Added error end positions for [`vue/no-irregular-whitespace`](https://eslint.vuejs.org/rules/no-irregular-whitespace.html) ([#3065](https://github.com/vuejs/eslint-plugin-vue/pull/3065)) - Updated resources: add `Attrs` and `AllowedAttrs` type definitions ([#3059](https://github.com/vuejs/eslint-plugin-vue/pull/3059)) - Improved error positions in [`vue/max-len`](https://eslint.vuejs.org/rules/max-len.html) ([#3066](https://github.com/vuejs/eslint-plugin-vue/pull/3066)) - Improve performance in [`vue/no-child-content`](https://eslint.vuejs.org/rules/no-child-content.html) rule ([#3068](https://github.com/vuejs/eslint-plugin-vue/pull/3068)) - Migrate configs to TypeScript ([#3002](https://github.com/vuejs/eslint-plugin-vue/pull/3002)) - Updated resources: `geolocation` HTML element and `ClassValue` and `InputAutoCompleteAttribute` Vue 3 export ([#3040](https://github.com/vuejs/eslint-plugin-vue/pull/3040))
### Patch Changes - Fixed false positives in non-intersecting conditions in [`vue/no-duplicate-class-names`](https://eslint.vuejs.org/rules/no-duplicate-class-names.html) and correctly detect duplicates in combining expressions ([#2980](https://github.com/vuejs/eslint-plugin-vue/pull/2980)) - Fixed false positives for `TSImportType` in [`vue/script-indent`](https://eslint.vuejs.org/rules/script-indent.html) rule ([#2969](https://github.com/vuejs/eslint-plugin-vue/pull/2969)) - Improved performance and type safety in [`vue/prefer-use-template-ref`](https://eslint.vuejs.org/rules/prefer-use-template-ref.html) ([#2982](https://github.com/vuejs/eslint-plugin-vue/pull/2982))
### Minor Changes - Added `ignoredObjectNames` option to [`vue/no-async-in-computed-properties`](https://eslint.vuejs.org/rules/no-async-in-computed-properties.html) ([#2927](https://github.com/vuejs/eslint-plugin-vue/pull/2927)) - Added `ignorePattern` option to [`vue/no-v-html`](https://eslint.vuejs.org/rules/no-v-html.html) ([#2857](https://github.com/vuejs/eslint-plugin-vue/pull/2857)) - Added `sortLineLength` option to [`vue/attributes-order`](https://eslint.vuejs.org/rules/attributes-order.html) ([#2759](https://github.com/vuejs/eslint-plugin-vue/pull/2759)) - Changed [`vue/component-name-in-template-casing`](https://eslint.vuejs.org/rules/component-name-in-template-casing.html) `globals` option to support regex patterns ([#2928](https://github.com/vuejs/eslint-plugin-vue/pull/2928)) - Changed [`vue/valid-define-options`](https://eslint.vuejs.org/rules/valid-define-options.html) to allow local literal constant references ([#2920](https://github.com/vuejs/eslint-plugin-vue/pull/2920)) - Changed [`vue/no-mutating-props`](https://eslint.vuejs.org/rules/no-mutating-props.html) and [`vue/no-side-effects-in-computed-properties`](https://eslint.vuejs.org/rules/no-side-effects-in-computed-properties.html) rules to detect `Object.assign` mutations ([#2929](https://github.com/vuejs/eslint-plugin-vue/pull/2929)) - Added [`@stylistic/eslint-plugin`](https://eslint.style/) as optional peer dependency ([#2884](https://github.com/vuejs/eslint-plugin-vue/pull/2884)) ### Patch Changes - Changed [`vue/define-macros-order`](https://eslint.vuejs.org/rules/define-macros-order.html) to ignore enum declarations and `declare` statements ([#2918](https://github.com/vuejs/eslint-plugin-vue/pull/2918))
### Minor Changes - Added [`@typescript-eslint/parser`](https://typescript-eslint.io/packages/parser) as an optional peer dependency ([#2775](https://github.com/vuejs/eslint-plugin-vue/pull/2775)) - Add TypeScript IntelliSense support via [eslint-typegen](https://github.com/antfu/eslint-typegen) ([#2770](https://github.com/vuejs/eslint-plugin-vue/pull/2770)) - [`vue/no-deprecated-slot-attribute`](https://eslint.vuejs.org/rules/no-deprecated-slot-attribute.html) `ignore` option now supports regex patterns ([#2773](https://github.com/vuejs/eslint-plugin-vue/pull/2773)) ### Patch Changes - Fixed false negatives when using typescript-eslint v8 in [`vue/script-indent`](https://eslint.vuejs.org/rules/script-indent.html) rule ([#2775](https://github.com/vuejs/eslint-plugin-vue/pull/2775)) - Update resources ([#2752](https://github.com/vuejs/eslint-plugin-vue/pull/2752)) - [`vue/no-restricted-html-elements`](https://eslint.vuejs.org/rules/no-restricted-html-elements.html) now also checks SVG and MathML elements ([#2755](https://github.com/vuejs/eslint-plugin-vue/pull/2755))
## ✨ Enhancements - #2734 Improved `allowlist` option of `vue/no-bare-strings-in-template` rule to accept regex. - #2736 Added `vue/define-props-destructuring` rule that enforce consistent style for props destructuring. - #2685 Added `disallowComments` option to `vue/no-multiple-template-root` rule. **Full Changelog**: https://github.com/vuejs/eslint-plugin-vue/compare/v10.0.1...v10.1.0
## 💥 Breaking changes - #2630 Changed Versioning Policy. - #2648 Renamed `.eslintrc` configs. - #2645 Removed deprecated rules. - #2669 Dropped support for old versions of ESLint and Node.js. - #2311 Improved the plugin to check for objects declared with Nuxt3 `defineNuxtComponent()`. - Update configs - #2627 Added `vue/block-order` rule to recommended configs. - #2628 Added `vue/no-deprecated-delete-set` rule to vue3-essential config. - #2629 Added `vue/no-deprecated-model-definition` rule to vue3-essential config. - #2640 Added `vue/no-required-prop-with-default` rule to recommended configs. - #2653 Added `vue/valid-define-options` rule to vue3-essential config. - #2668 Changed `.eslintrc` base config so that vue-eslint-parser is only used for `.vue`. - #2674 Removed globals from configs. - #2153 Added `slots` and `expose` to the default order of `vue/order-in-components` rule. - #2670 Changed vue-eslint-parser to peer dependency. - #2626 Removed legacy option from `vue/custom-event-name-casing` rule. - #2655 Removed unused `runOutsideVue` option from `vue/sort-keys` rule. - #2652 Removed `setup-compiler-macros` environments. - #2697 Upgraded vue-eslint-parser to v10. ## ✨ Enhancements - #2693 Improved type resolution for generic types and improved the rules for checking type-only macros. - #2684 Added `vue/no-import-compiler-macros` rule that disallow importing Vue compiler macros. - #2311 Improved the plugin to check for objects declared with Nuxt3 `defineNuxtComponent()`. - #2694 Added `except` option to `vue/prefer-true-attribute-shorthand` rule. ## ⚙️ Updates - Update configs - #2627 Added `vue/block-order` rule to recommended configs. - #2628 Added `vue/no-deprecated-delete-set` rule to vue3-essential config. - #2629 Added `vue/no-deprecated-model-definition` rule to vue3-essential config. - #2640 Added `vue/no-required-prop-with-default` rule to recommended configs. - #2653 Added `vue/valid-define-options` rule to vue3-essential config. - #2668 Changed `.eslintrc` base config so that vue-eslint-parser is only used for `.vue`. - #2674 Removed globals from configs. - #2153 Added `slots` and `expose` to the default order of `vue/order-in-components` rule. - #2171 Updated resources. - #2630 Changed Versioning Policy. - #2645 Removed deprecated rules. - #2648 Renamed `.eslintrc` configs. - #2652 Removed `setup-compiler-macros` environments. - #2655 Removed unused `runOutsideVue` option from `vue/sort-keys` rule. - #2670 Changed vue-eslint-parser to peer dependency. - #2669 Dropped support for old versions of ESLint and Node.js. - #2675 Deprecated Vue 2 only rules. - #2697 Upgraded vue-eslint-parser to v10. **Full Changelog**: https://github.com/vuejs/eslint-plugin-vue/compare/v9.33.0...v10.0.0
## ✨ Enhancements - #2639 Added `vue/no-implicit-coercion` rule to disallow shorthand type conversions in `<template>`. - #2680 Improved `vue/no-ref-as-operand` rule to check the emit payload. - #2679 Added `ignoreProps` option to `vue/prop-name-casing` rule. ## 🐛 Bug Fixes - #2636 Fixed crash when use non-block setup function in `vue/prefer-use-template-ref` rule. - #2682 Fixed resolve regex matching order in `vue/no-bare-strings-in-template` rule. - #2683 Fixed false positives for union type prop definitions in `vue/max-props` rule. **Full Changelog**: https://github.com/vuejs/eslint-plugin-vue/compare/v9.32.0...v9.33.0
## ✨ Enhancements * #2598 Added `checkMultiRootNodes` option to `vue/no-duplicate-attr-inheritance` rule and changed to ignore multi-root components by default. * #2610 Added `ignoreElementNamespaces` option to `vue/no-v-text-v-html-on-component` rule. * #2609 Added `ignoreTags` option to `vue/attribute-hyphenation` rule and `vue/v-on-event-hyphenation` rule. * #2611 Added `vue/restricted-component-names` rule that enforces using only specific component names. * #2620 Added `vue/slot-name-casing` rule that enforces specific casing for slot names. * #2617 Added support for type references in `vue/require-explicit-slots` rule. * #2608 Added support for `shallowRef` in `vue/prefer-use-template-ref` rule. ## 🐛 Bug Fixes * #2612 Changed `vue/prefer-use-template-ref` rule to only check root-level variables. **Full Changelog**: https://github.com/vuejs/eslint-plugin-vue/compare/v9.31.0...v9.32.0