Skip to content

Commit a0cf018

Browse files
Remove deprecated rules (#1881)
* Remove deprecated rules * Remove no longer needed `script-setup` test * Restore docs from removed rules * Mention in rule docs that they are removed * Add "Removed" section to rules list in docs * Use different emoji for removed rules * Remove no longer necessary warning block Co-authored-by: yosuke ota <[email protected]>
1 parent 2f96315 commit a0cf018

18 files changed

+115
-1742
lines changed

docs/rules/README.md

+11-4
Original file line numberDiff line numberDiff line change
@@ -315,9 +315,16 @@ The following rules extend the rules provided by ESLint itself and apply them to
315315

316316
| Rule ID | Replaced by |
317317
|:--------|:------------|
318-
| [vue/experimental-script-setup-vars](./experimental-script-setup-vars.md) | (no replacement) |
319-
| [vue/name-property-casing](./name-property-casing.md) | [vue/component-definition-name-casing](./component-definition-name-casing.md) |
320-
| [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) |
321318
| [vue/no-invalid-model-keys](./no-invalid-model-keys.md) | [vue/valid-model-definition](./valid-model-definition.md) |
322-
| [vue/no-unregistered-components](./no-unregistered-components.md) | [vue/no-undef-components](./no-undef-components.md) |
323319
| [vue/script-setup-uses-vars](./script-setup-uses-vars.md) | (no replacement) |
320+
321+
## Removed
322+
323+
- :no_entry_sign: These rules have been removed in a previous major release, after they have been deprecated for a while.
324+
325+
| Rule ID | Replaced by | Deprecated in version | Removed in version |
326+
|:--------|:------------|:-----------------------|:-------------------|
327+
| [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) |
328+
| [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) |
329+
| [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) |
330+
| [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) |

docs/rules/experimental-script-setup-vars.md

+1-5
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,7 @@ since: v7.0.0
99

1010
> prevent variables defined in `<script setup>` to be marked as undefined
1111
12-
- :warning: This rule was **deprecated**.
13-
14-
:::warning
15-
This rule is an experimental rule. It may be removed without notice.
16-
:::
12+
- :no_entry_sign: This rule was **removed** in eslint-plugin-vue v9.0.0.
1713

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

docs/rules/name-property-casing.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ since: v3.8.0
99

1010
> enforce specific casing for the name property in Vue components
1111
12-
- :warning: This rule was **deprecated** and replaced by [vue/component-definition-name-casing](component-definition-name-casing.md) rule.
13-
- :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.
12+
- :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.
1413

1514
## :book: Rule Details
1615

docs/rules/no-confusing-v-for-v-if.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ since: v3.0.0
99

1010
> disallow confusing `v-for` and `v-if` on the same element
1111
12-
- :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.
12+
- :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.
1313

1414
## :book: Rule Details
1515

docs/rules/no-unregistered-components.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ since: v7.0.0
99

1010
> disallow using components that are not registered inside templates
1111
12-
- :warning: This rule was **deprecated** and replaced by [vue/no-undef-components](no-undef-components.md) rule.
12+
- :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.
1313

1414
## :book: Rule Details
1515

lib/index.js

+2-5
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ module.exports = {
3131
'dot-location': require('./rules/dot-location'),
3232
'dot-notation': require('./rules/dot-notation'),
3333
eqeqeq: require('./rules/eqeqeq'),
34-
'experimental-script-setup-vars': require('./rules/experimental-script-setup-vars'),
3534
'first-attribute-linebreak': require('./rules/first-attribute-linebreak'),
3635
'func-call-spacing': require('./rules/func-call-spacing'),
3736
'html-button-has-type': require('./rules/html-button-has-type'),
@@ -54,7 +53,6 @@ module.exports = {
5453
'multi-word-component-names': require('./rules/multi-word-component-names'),
5554
'multiline-html-element-content-newline': require('./rules/multiline-html-element-content-newline'),
5655
'mustache-interpolation-spacing': require('./rules/mustache-interpolation-spacing'),
57-
'name-property-casing': require('./rules/name-property-casing'),
5856
'new-line-between-multi-line-property': require('./rules/new-line-between-multi-line-property'),
5957
'next-tick-style': require('./rules/next-tick-style'),
6058
'no-arrow-functions-in-watch': require('./rules/no-arrow-functions-in-watch'),
@@ -63,7 +61,6 @@ module.exports = {
6361
'no-boolean-default': require('./rules/no-boolean-default'),
6462
'no-child-content': require('./rules/no-child-content'),
6563
'no-computed-properties-in-data': require('./rules/no-computed-properties-in-data'),
66-
'no-confusing-v-for-v-if': require('./rules/no-confusing-v-for-v-if'),
6764
'no-constant-condition': require('./rules/no-constant-condition'),
6865
'no-custom-modifiers-on-v-model': require('./rules/no-custom-modifiers-on-v-model'),
6966
'no-deprecated-data-object-declaration': require('./rules/no-deprecated-data-object-declaration'),
@@ -133,7 +130,6 @@ module.exports = {
133130
'no-this-in-before-route-enter': require('./rules/no-this-in-before-route-enter'),
134131
'no-undef-components': require('./rules/no-undef-components'),
135132
'no-undef-properties': require('./rules/no-undef-properties'),
136-
'no-unregistered-components': require('./rules/no-unregistered-components'),
137133
'no-unsupported-features': require('./rules/no-unsupported-features'),
138134
'no-unused-components': require('./rules/no-unused-components'),
139135
'no-unused-properties': require('./rules/no-unused-properties'),
@@ -237,7 +233,8 @@ module.exports = {
237233
'.vue': require('./processor')
238234
},
239235
environments: {
240-
// Deprecated
236+
// TODO Remove in the next major version
237+
/** @deprecated */
241238
'setup-compiler-macros': {
242239
globals: {
243240
defineProps: 'readonly',

lib/removed-rules.js

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
'use strict'
2+
3+
/**
4+
* @typedef {object} RemovedRule
5+
* @property {string} ruleName
6+
* @property {string[]} replacedBy
7+
* @property {string} deprecatedInVersion
8+
* @property {string} removedInVersion
9+
*/
10+
11+
/** @type {RemovedRule[]} */
12+
module.exports = [
13+
{
14+
ruleName: 'experimental-script-setup-vars',
15+
replacedBy: [],
16+
deprecatedInVersion: 'v7.13.0',
17+
removedInVersion: 'v9.0.0'
18+
},
19+
{
20+
ruleName: 'name-property-casing',
21+
replacedBy: ['component-definition-name-casing'],
22+
deprecatedInVersion: 'v7.0.0',
23+
removedInVersion: 'v9.0.0'
24+
},
25+
{
26+
ruleName: 'no-confusing-v-for-v-if',
27+
replacedBy: ['no-use-v-if-with-v-for'],
28+
deprecatedInVersion: 'v5.0.0',
29+
removedInVersion: 'v9.0.0'
30+
},
31+
{
32+
ruleName: 'no-unregistered-components',
33+
replacedBy: ['no-undef-components'],
34+
deprecatedInVersion: 'v8.4.0',
35+
removedInVersion: 'v9.0.0'
36+
}
37+
]

lib/rules/experimental-script-setup-vars.js

-230
This file was deleted.

0 commit comments

Comments
 (0)