Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated rules #2645

Merged
merged 6 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions docs/rules/component-tags-order.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ since: v6.1.0

> enforce order of component top-level elements

- :no_entry_sign: This rule was **deprecated** and replaced by [vue/block-order](block-order.md) rule.
- :wrench: The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#fixing-problems) can automatically fix some of the problems reported by this rule.
- :no_entry: This rule was **removed** in eslint-plugin-vue v10.0.0 and replaced by [vue/block-order](block-order.md) rule.

## :book: Rule Details

Expand Down
36 changes: 16 additions & 20 deletions docs/rules/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -341,30 +341,22 @@ The following rules extend the rules provided by ESLint itself and apply them to

</rules-table>

## Deprecated

- :no_entry_sign: We're going to remove deprecated rules in the next major release. Please migrate to successor/new rules.
- :innocent: We don't fix bugs which are in deprecated rules since we don't have enough resources.

| Rule ID | Replaced by |
|:--------|:------------|
| [vue/component-tags-order] | [vue/block-order] |
| [vue/no-invalid-model-keys] | [vue/valid-model-definition] |
| [vue/no-ref-object-destructure] | [vue/no-ref-object-reactivity-loss] |
| [vue/no-setup-props-destructure] | [vue/no-setup-props-reactivity-loss] |
| [vue/script-setup-uses-vars] | (no replacement) |
| [vue/v-on-function-call] | [vue/v-on-handler-style] |

## Removed

- :no_entry: These rules have been removed in a previous major release, after they have been deprecated for a while.

| Rule ID | Replaced by | Deprecated in version | Removed in version |
|:--------|:------------|:-----------------------|:-------------------|
| [vue/component-tags-order] | [vue/block-order] | [v9.16.0] | [v10.0.0] |
| [vue/experimental-script-setup-vars] | (no replacement) | [v7.13.0] | [v9.0.0] |
| [vue/name-property-casing] | [vue/component-definition-name-casing] | [v7.0.0] | [v9.0.0] |
| [vue/no-confusing-v-for-v-if] | [vue/no-use-v-if-with-v-for] | [v5.0.0] | [v9.0.0] |
| [vue/no-invalid-model-keys] | [vue/valid-model-definition] | [v9.0.0] | [v10.0.0] |
| [vue/no-ref-object-destructure] | [vue/no-ref-object-reactivity-loss] | [v9.17.0] | [v10.0.0] |
| [vue/no-setup-props-destructure] | [vue/no-setup-props-reactivity-loss] | [v9.17.0] | [v10.0.0] |
| [vue/no-unregistered-components] | [vue/no-undef-components] | [v8.4.0] | [v9.0.0] |
| [vue/script-setup-uses-vars] | (no replacement) | [v9.0.0] | [v10.0.0] |
| [vue/v-on-function-call] | [vue/v-on-handler-style] | [v9.7.0] | [v10.0.0] |

<!-- link definitions for rules -->

Expand All @@ -388,7 +380,6 @@ The following rules extend the rules provided by ESLint itself and apply them to
[vue/component-definition-name-casing]: ./component-definition-name-casing.md
[vue/component-name-in-template-casing]: ./component-name-in-template-casing.md
[vue/component-options-name-casing]: ./component-options-name-casing.md
[vue/component-tags-order]: ./component-tags-order.md
[vue/custom-event-name-casing]: ./custom-event-name-casing.md
[vue/define-emits-declaration]: ./define-emits-declaration.md
[vue/define-macros-order]: ./define-macros-order.md
Expand Down Expand Up @@ -464,7 +455,6 @@ The following rules extend the rules provided by ESLint itself and apply them to
[vue/no-export-in-script-setup]: ./no-export-in-script-setup.md
[vue/no-expose-after-await]: ./no-expose-after-await.md
[vue/no-extra-parens]: ./no-extra-parens.md
[vue/no-invalid-model-keys]: ./no-invalid-model-keys.md
[vue/no-irregular-whitespace]: ./no-irregular-whitespace.md
[vue/no-lifecycle-after-await]: ./no-lifecycle-after-await.md
[vue/no-lone-template]: ./no-lone-template.md
Expand All @@ -477,7 +467,6 @@ The following rules extend the rules provided by ESLint itself and apply them to
[vue/no-parsing-error]: ./no-parsing-error.md
[vue/no-potential-component-option-typo]: ./no-potential-component-option-typo.md
[vue/no-ref-as-operand]: ./no-ref-as-operand.md
[vue/no-ref-object-destructure]: ./no-ref-object-destructure.md
[vue/no-ref-object-reactivity-loss]: ./no-ref-object-reactivity-loss.md
[vue/no-required-prop-with-default]: ./no-required-prop-with-default.md
[vue/no-reserved-component-names]: ./no-reserved-component-names.md
Expand All @@ -496,7 +485,6 @@ The following rules extend the rules provided by ESLint itself and apply them to
[vue/no-restricted-v-bind]: ./no-restricted-v-bind.md
[vue/no-restricted-v-on]: ./no-restricted-v-on.md
[vue/no-root-v-if]: ./no-root-v-if.md
[vue/no-setup-props-destructure]: ./no-setup-props-destructure.md
[vue/no-setup-props-reactivity-loss]: ./no-setup-props-reactivity-loss.md
[vue/no-shared-component-data]: ./no-shared-component-data.md
[vue/no-side-effects-in-computed-properties]: ./no-side-effects-in-computed-properties.md
Expand Down Expand Up @@ -573,7 +561,6 @@ The following rules extend the rules provided by ESLint itself and apply them to
[vue/return-in-computed-property]: ./return-in-computed-property.md
[vue/return-in-emits-validator]: ./return-in-emits-validator.md
[vue/script-indent]: ./script-indent.md
[vue/script-setup-uses-vars]: ./script-setup-uses-vars.md
[vue/singleline-html-element-content-newline]: ./singleline-html-element-content-newline.md
[vue/slot-name-casing]: ./slot-name-casing.md
[vue/sort-keys]: ./sort-keys.md
Expand All @@ -588,7 +575,6 @@ The following rules extend the rules provided by ESLint itself and apply them to
[vue/v-for-delimiter-style]: ./v-for-delimiter-style.md
[vue/v-if-else-key]: ./v-if-else-key.md
[vue/v-on-event-hyphenation]: ./v-on-event-hyphenation.md
[vue/v-on-function-call]: ./v-on-function-call.md
[vue/v-on-handler-style]: ./v-on-handler-style.md
[vue/v-on-style]: ./v-on-style.md
[vue/v-slot-style]: ./v-slot-style.md
Expand Down Expand Up @@ -619,15 +605,25 @@ The following rules extend the rules provided by ESLint itself and apply them to

<!-- link definitions for removed rules -->

[vue/component-tags-order]: ./component-tags-order.md
[vue/experimental-script-setup-vars]: ./experimental-script-setup-vars.md
[vue/name-property-casing]: ./name-property-casing.md
[vue/no-confusing-v-for-v-if]: ./no-confusing-v-for-v-if.md
[vue/no-invalid-model-keys]: ./no-invalid-model-keys.md
[vue/no-ref-object-destructure]: ./no-ref-object-destructure.md
[vue/no-setup-props-destructure]: ./no-setup-props-destructure.md
[vue/no-unregistered-components]: ./no-unregistered-components.md
[vue/script-setup-uses-vars]: ./script-setup-uses-vars.md
[vue/v-on-function-call]: ./v-on-function-call.md

<!-- link definitions for releases -->

[v10.0.0]: https://github.com/vuejs/eslint-plugin-vue/releases/tag/v10.0.0
[v5.0.0]: https://github.com/vuejs/eslint-plugin-vue/releases/tag/v5.0.0
[v7.0.0]: https://github.com/vuejs/eslint-plugin-vue/releases/tag/v7.0.0
[v7.13.0]: https://github.com/vuejs/eslint-plugin-vue/releases/tag/v7.13.0
[v8.4.0]: https://github.com/vuejs/eslint-plugin-vue/releases/tag/v8.4.0
[v9.0.0]: https://github.com/vuejs/eslint-plugin-vue/releases/tag/v9.0.0
[v9.16.0]: https://github.com/vuejs/eslint-plugin-vue/releases/tag/v9.16.0
[v9.17.0]: https://github.com/vuejs/eslint-plugin-vue/releases/tag/v9.17.0
[v9.7.0]: https://github.com/vuejs/eslint-plugin-vue/releases/tag/v9.7.0
2 changes: 1 addition & 1 deletion docs/rules/no-invalid-model-keys.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ since: v7.9.0

> require valid keys in model option

- :no_entry_sign: This rule was **deprecated** and replaced by [vue/valid-model-definition](valid-model-definition.md) rule.
- :no_entry: This rule was **removed** in eslint-plugin-vue v10.0.0 and replaced by [vue/valid-model-definition](valid-model-definition.md) rule.

## :book: Rule Details

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-ref-object-destructure.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ since: v9.5.0

> disallow usages of ref objects that can lead to loss of reactivity

- :no_entry_sign: This rule was **deprecated** and replaced by [vue/no-ref-object-reactivity-loss](no-ref-object-reactivity-loss.md) rule.
- :no_entry: This rule was **removed** in eslint-plugin-vue v10.0.0 and replaced by [vue/no-ref-object-reactivity-loss](no-ref-object-reactivity-loss.md) rule.

## :book: Rule Details

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-setup-props-destructure.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ since: v7.0.0

> disallow usages that lose the reactivity of `props` passed to `setup`

- :no_entry_sign: This rule was **deprecated** and replaced by [vue/no-setup-props-reactivity-loss](no-setup-props-reactivity-loss.md) rule.
- :no_entry: This rule was **removed** in eslint-plugin-vue v10.0.0 and replaced by [vue/no-setup-props-reactivity-loss](no-setup-props-reactivity-loss.md) rule.

## :book: Rule Details

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/script-setup-uses-vars.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ since: v7.13.0

> prevent `<script setup>` variables used in `<template>` to be marked as unused

- :no_entry_sign: This rule was **deprecated**.
- :no_entry: This rule was **removed** in eslint-plugin-vue v10.0.0.

::: tip

Expand Down
3 changes: 1 addition & 2 deletions docs/rules/v-on-function-call.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ since: v5.2.0

> enforce or forbid parentheses after method calls without arguments in `v-on` directives

- :no_entry_sign: This rule was **deprecated** and replaced by [vue/v-on-handler-style](v-on-handler-style.md) rule.
- :wrench: The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#fixing-problems) can automatically fix some of the problems reported by this rule.
- :no_entry: This rule was **removed** in eslint-plugin-vue v10.0.0 and replaced by [vue/v-on-handler-style](v-on-handler-style.md) rule.

## :book: Rule Details

Expand Down
6 changes: 0 additions & 6 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ const plugin = {
'component-definition-name-casing': require('./rules/component-definition-name-casing'),
'component-name-in-template-casing': require('./rules/component-name-in-template-casing'),
'component-options-name-casing': require('./rules/component-options-name-casing'),
'component-tags-order': require('./rules/component-tags-order'),
'custom-event-name-casing': require('./rules/custom-event-name-casing'),
'define-emits-declaration': require('./rules/define-emits-declaration'),
'define-macros-order': require('./rules/define-macros-order'),
Expand Down Expand Up @@ -126,7 +125,6 @@ const plugin = {
'no-export-in-script-setup': require('./rules/no-export-in-script-setup'),
'no-expose-after-await': require('./rules/no-expose-after-await'),
'no-extra-parens': require('./rules/no-extra-parens'),
'no-invalid-model-keys': require('./rules/no-invalid-model-keys'),
'no-irregular-whitespace': require('./rules/no-irregular-whitespace'),
'no-lifecycle-after-await': require('./rules/no-lifecycle-after-await'),
'no-lone-template': require('./rules/no-lone-template'),
Expand All @@ -139,7 +137,6 @@ const plugin = {
'no-parsing-error': require('./rules/no-parsing-error'),
'no-potential-component-option-typo': require('./rules/no-potential-component-option-typo'),
'no-ref-as-operand': require('./rules/no-ref-as-operand'),
'no-ref-object-destructure': require('./rules/no-ref-object-destructure'),
'no-ref-object-reactivity-loss': require('./rules/no-ref-object-reactivity-loss'),
'no-required-prop-with-default': require('./rules/no-required-prop-with-default'),
'no-reserved-component-names': require('./rules/no-reserved-component-names'),
Expand All @@ -158,7 +155,6 @@ const plugin = {
'no-restricted-v-bind': require('./rules/no-restricted-v-bind'),
'no-restricted-v-on': require('./rules/no-restricted-v-on'),
'no-root-v-if': require('./rules/no-root-v-if'),
'no-setup-props-destructure': require('./rules/no-setup-props-destructure'),
'no-setup-props-reactivity-loss': require('./rules/no-setup-props-reactivity-loss'),
'no-shared-component-data': require('./rules/no-shared-component-data'),
'no-side-effects-in-computed-properties': require('./rules/no-side-effects-in-computed-properties'),
Expand Down Expand Up @@ -235,7 +231,6 @@ const plugin = {
'return-in-computed-property': require('./rules/return-in-computed-property'),
'return-in-emits-validator': require('./rules/return-in-emits-validator'),
'script-indent': require('./rules/script-indent'),
'script-setup-uses-vars': require('./rules/script-setup-uses-vars'),
'singleline-html-element-content-newline': require('./rules/singleline-html-element-content-newline'),
'slot-name-casing': require('./rules/slot-name-casing'),
'sort-keys': require('./rules/sort-keys'),
Expand All @@ -250,7 +245,6 @@ const plugin = {
'v-for-delimiter-style': require('./rules/v-for-delimiter-style'),
'v-if-else-key': require('./rules/v-if-else-key'),
'v-on-event-hyphenation': require('./rules/v-on-event-hyphenation'),
'v-on-function-call': require('./rules/v-on-function-call'),
'v-on-handler-style': require('./rules/v-on-handler-style'),
'v-on-style': require('./rules/v-on-style'),
'v-slot-style': require('./rules/v-slot-style'),
Expand Down
36 changes: 36 additions & 0 deletions lib/removed-rules.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@

/** @type {RemovedRule[]} */
module.exports = [
{
ruleName: 'component-tags-order',
replacedBy: ['block-order'],
deprecatedInVersion: 'v9.16.0',
removedInVersion: 'v10.0.0'
},
{
ruleName: 'experimental-script-setup-vars',
replacedBy: [],
Expand All @@ -28,10 +34,40 @@ module.exports = [
deprecatedInVersion: 'v5.0.0',
removedInVersion: 'v9.0.0'
},
{
ruleName: 'no-invalid-model-keys',
replacedBy: ['valid-model-definition'],
deprecatedInVersion: 'v9.0.0',
removedInVersion: 'v10.0.0'
},
{
ruleName: 'no-ref-object-destructure',
replacedBy: ['no-ref-object-reactivity-loss'],
deprecatedInVersion: 'v9.17.0',
removedInVersion: 'v10.0.0'
},
{
ruleName: 'no-setup-props-destructure',
replacedBy: ['no-setup-props-reactivity-loss'],
deprecatedInVersion: 'v9.17.0',
removedInVersion: 'v10.0.0'
},
{
ruleName: 'no-unregistered-components',
replacedBy: ['no-undef-components'],
deprecatedInVersion: 'v8.4.0',
removedInVersion: 'v9.0.0'
},
{
ruleName: 'script-setup-uses-vars',
replacedBy: [],
deprecatedInVersion: 'v9.0.0',
removedInVersion: 'v10.0.0'
},
{
ruleName: 'v-on-function-call',
replacedBy: ['v-on-handler-style'],
deprecatedInVersion: 'v9.7.0',
removedInVersion: 'v10.0.0'
}
]
23 changes: 0 additions & 23 deletions lib/rules/component-tags-order.js

This file was deleted.

24 changes: 0 additions & 24 deletions lib/rules/no-invalid-model-keys.js

This file was deleted.

24 changes: 0 additions & 24 deletions lib/rules/no-ref-object-destructure.js

This file was deleted.

24 changes: 0 additions & 24 deletions lib/rules/no-setup-props-destructure.js

This file was deleted.

Loading