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 #1881

Merged
merged 10 commits into from May 12, 2022
15 changes: 11 additions & 4 deletions docs/rules/README.md
Expand Up @@ -315,9 +315,16 @@ The following rules extend the rules provided by ESLint itself and apply them to

| Rule ID | Replaced by |
|:--------|:------------|
| [vue/experimental-script-setup-vars](./experimental-script-setup-vars.md) | (no replacement) |
| [vue/name-property-casing](./name-property-casing.md) | [vue/component-definition-name-casing](./component-definition-name-casing.md) |
| [vue/no-confusing-v-for-v-if](./no-confusing-v-for-v-if.md) | [vue/no-use-v-if-with-v-for](./no-use-v-if-with-v-for.md) |
| [vue/no-invalid-model-keys](./no-invalid-model-keys.md) | [vue/valid-model-definition](./valid-model-definition.md) |
| [vue/no-unregistered-components](./no-unregistered-components.md) | [vue/no-undef-components](./no-undef-components.md) |
| [vue/script-setup-uses-vars](./script-setup-uses-vars.md) | (no replacement) |

## Removed

- :no_entry_sign: 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/experimental-script-setup-vars](./experimental-script-setup-vars.md) | (no replacement) | [v7.13.0](https://github.com/vuejs/eslint-plugin-vue/releases/tag/v7.13.0) | [v9.0.0](https://github.com/vuejs/eslint-plugin-vue/releases/tag/v9.0.0) |
| [vue/name-property-casing](./name-property-casing.md) | [vue/component-definition-name-casing](./component-definition-name-casing.md) | [v7.0.0](https://github.com/vuejs/eslint-plugin-vue/releases/tag/v7.0.0) | [v9.0.0](https://github.com/vuejs/eslint-plugin-vue/releases/tag/v9.0.0) |
| [vue/no-confusing-v-for-v-if](./no-confusing-v-for-v-if.md) | [vue/no-use-v-if-with-v-for](./no-use-v-if-with-v-for.md) | [v5.0.0](https://github.com/vuejs/eslint-plugin-vue/releases/tag/v5.0.0) | [v9.0.0](https://github.com/vuejs/eslint-plugin-vue/releases/tag/v9.0.0) |
| [vue/no-unregistered-components](./no-unregistered-components.md) | [vue/no-undef-components](./no-undef-components.md) | [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) |
6 changes: 1 addition & 5 deletions docs/rules/experimental-script-setup-vars.md
Expand Up @@ -9,11 +9,7 @@ since: v7.0.0

> prevent variables defined in `<script setup>` to be marked as undefined

- :warning: This rule was **deprecated**.

:::warning
This rule is an experimental rule. It may be removed without notice.
:::
- :no_entry_sign: This rule was **removed** in eslint-plugin-vue v9.0.0.

This rule will find variables defined in `<script setup="args">` and mark them as defined variables.

Expand Down
3 changes: 1 addition & 2 deletions docs/rules/name-property-casing.md
Expand Up @@ -9,8 +9,7 @@ since: v3.8.0

> enforce specific casing for the name property in Vue components

- :warning: This rule was **deprecated** and replaced by [vue/component-definition-name-casing](component-definition-name-casing.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_sign: This rule was **removed** in eslint-plugin-vue v9.0.0 and replaced by [vue/component-definition-name-casing](component-definition-name-casing.md) rule.

## :book: Rule Details

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-confusing-v-for-v-if.md
Expand Up @@ -9,7 +9,7 @@ since: v3.0.0

> disallow confusing `v-for` and `v-if` on the same element

- :warning: This rule was **deprecated** and replaced by [vue/no-use-v-if-with-v-for](no-use-v-if-with-v-for.md) rule.
- :no_entry_sign: This rule was **removed** in eslint-plugin-vue v9.0.0 and replaced by [vue/no-use-v-if-with-v-for](no-use-v-if-with-v-for.md) rule.

## :book: Rule Details

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-unregistered-components.md
Expand Up @@ -9,7 +9,7 @@ since: v7.0.0

> disallow using components that are not registered inside templates

- :warning: This rule was **deprecated** and replaced by [vue/no-undef-components](no-undef-components.md) rule.
- :no_entry_sign: This rule was **removed** in eslint-plugin-vue v9.0.0 and replaced by [vue/no-undef-components](no-undef-components.md) rule.

## :book: Rule Details

Expand Down
7 changes: 2 additions & 5 deletions lib/index.js
Expand Up @@ -31,7 +31,6 @@ module.exports = {
'dot-location': require('./rules/dot-location'),
'dot-notation': require('./rules/dot-notation'),
eqeqeq: require('./rules/eqeqeq'),
'experimental-script-setup-vars': require('./rules/experimental-script-setup-vars'),
'first-attribute-linebreak': require('./rules/first-attribute-linebreak'),
'func-call-spacing': require('./rules/func-call-spacing'),
'html-button-has-type': require('./rules/html-button-has-type'),
Expand All @@ -54,7 +53,6 @@ module.exports = {
'multi-word-component-names': require('./rules/multi-word-component-names'),
'multiline-html-element-content-newline': require('./rules/multiline-html-element-content-newline'),
'mustache-interpolation-spacing': require('./rules/mustache-interpolation-spacing'),
'name-property-casing': require('./rules/name-property-casing'),
'new-line-between-multi-line-property': require('./rules/new-line-between-multi-line-property'),
'next-tick-style': require('./rules/next-tick-style'),
'no-arrow-functions-in-watch': require('./rules/no-arrow-functions-in-watch'),
Expand All @@ -63,7 +61,6 @@ module.exports = {
'no-boolean-default': require('./rules/no-boolean-default'),
'no-child-content': require('./rules/no-child-content'),
'no-computed-properties-in-data': require('./rules/no-computed-properties-in-data'),
'no-confusing-v-for-v-if': require('./rules/no-confusing-v-for-v-if'),
'no-constant-condition': require('./rules/no-constant-condition'),
'no-custom-modifiers-on-v-model': require('./rules/no-custom-modifiers-on-v-model'),
'no-deprecated-data-object-declaration': require('./rules/no-deprecated-data-object-declaration'),
Expand Down Expand Up @@ -133,7 +130,6 @@ module.exports = {
'no-this-in-before-route-enter': require('./rules/no-this-in-before-route-enter'),
'no-undef-components': require('./rules/no-undef-components'),
'no-undef-properties': require('./rules/no-undef-properties'),
'no-unregistered-components': require('./rules/no-unregistered-components'),
'no-unsupported-features': require('./rules/no-unsupported-features'),
'no-unused-components': require('./rules/no-unused-components'),
'no-unused-properties': require('./rules/no-unused-properties'),
Expand Down Expand Up @@ -237,7 +233,8 @@ module.exports = {
'.vue': require('./processor')
},
environments: {
// Deprecated
// TODO Remove in the next major version
/** @deprecated */
'setup-compiler-macros': {
globals: {
defineProps: 'readonly',
Expand Down
37 changes: 37 additions & 0 deletions lib/removed-rules.js
@@ -0,0 +1,37 @@
'use strict'

/**
* @typedef {object} RemovedRule
* @property {string} ruleName
* @property {string[]} replacedBy
* @property {string} deprecatedInVersion
* @property {string} removedInVersion
*/

/** @type {RemovedRule[]} */
module.exports = [
{
ruleName: 'experimental-script-setup-vars',
replacedBy: [],
deprecatedInVersion: 'v7.13.0',
removedInVersion: 'v9.0.0'
},
{
ruleName: 'name-property-casing',
replacedBy: ['component-definition-name-casing'],
deprecatedInVersion: 'v7.0.0',
removedInVersion: 'v9.0.0'
},
{
ruleName: 'no-confusing-v-for-v-if',
replacedBy: ['no-use-v-if-with-v-for'],
deprecatedInVersion: 'v5.0.0',
removedInVersion: 'v9.0.0'
},
{
ruleName: 'no-unregistered-components',
replacedBy: ['no-undef-components'],
deprecatedInVersion: 'v8.4.0',
removedInVersion: 'v9.0.0'
}
]
230 changes: 0 additions & 230 deletions lib/rules/experimental-script-setup-vars.js

This file was deleted.