Skip to content

Commit 9bbef7e

Browse files
authored
Allow deprecated rules in configs (#2234)
1 parent 6a4a7da commit 9bbef7e

11 files changed

+19
-24
lines changed

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

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

1010
> prevent variables defined in `<script setup>` to be marked as undefined
1111
12-
- :no_entry_sign: This rule was **removed** in eslint-plugin-vue v9.0.0.
12+
- :no_entry: This rule was **removed** in eslint-plugin-vue v9.0.0.
1313

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

docs/rules/index.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ The following rules extend the rules provided by ESLint itself and apply them to
330330

331331
## Deprecated
332332

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

336336
| Rule ID | Replaced by |
@@ -341,7 +341,7 @@ The following rules extend the rules provided by ESLint itself and apply them to
341341

342342
## Removed
343343

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

346346
| Rule ID | Replaced by | Deprecated in version | Removed in version |
347347
|:--------|:------------|:-----------------------|:-------------------|

docs/rules/name-property-casing.md

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

1010
> enforce specific casing for the name property in Vue components
1111
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.
12+
- :no_entry: 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.
1313

1414
## :book: Rule Details
1515

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-
- :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.
12+
- :no_entry: 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-invalid-model-keys.md

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

1010
> require valid keys in model option
1111
12-
- :warning: This rule was **deprecated** and replaced by [vue/valid-model-definition](valid-model-definition.md) rule.
12+
- :no_entry_sign: This rule was **deprecated** and replaced by [vue/valid-model-definition](valid-model-definition.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-
- :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.
12+
- :no_entry: 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

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

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

1010
> prevent `<script setup>` variables used in `<template>` to be marked as unused
1111
12-
- :warning: This rule was **deprecated**.
12+
- :no_entry_sign: This rule was **deprecated**.
1313

1414
::: tip
1515

docs/rules/v-on-function-call.md

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

1010
> enforce or forbid parentheses after method calls without arguments in `v-on` directives
1111
12-
- :warning: This rule was **deprecated** and replaced by [vue/v-on-handler-style](v-on-handler-style.md) rule.
12+
- :no_entry_sign: This rule was **deprecated** and replaced by [vue/v-on-handler-style](v-on-handler-style.md) rule.
1313
- :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.
1414

1515
## :book: Rule Details

tools/lib/categories.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,6 @@ module.exports = categoryIds
5656
.map((categoryId) => ({
5757
categoryId,
5858
title: categoryTitles[categoryId],
59-
rules: (categoryRules[categoryId] || []).filter(
60-
(rule) => !rule.meta.deprecated
61-
)
59+
rules: categoryRules[categoryId] || []
6260
}))
6361
.filter((category) => category.rules.length > 0)

tools/update-docs-rules-index.js

+4-7
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,7 @@ const VUE2_EMOJI = ':two:'
1515

1616
// -----------------------------------------------------------------------------
1717
const categorizedRules = rules.filter(
18-
(rule) =>
19-
rule.meta.docs.categories &&
20-
!rule.meta.docs.extensionRule &&
21-
!rule.meta.deprecated
18+
(rule) => rule.meta.docs.categories && !rule.meta.docs.extensionRule
2219
)
2320
const uncategorizedRules = rules.filter(
2421
(rule) =>
@@ -44,7 +41,7 @@ function toRuleRow(rule, kindMarks = []) {
4441
const mark = [
4542
rule.meta.fixable ? ':wrench:' : '',
4643
rule.meta.hasSuggestions ? ':bulb:' : '',
47-
rule.meta.deprecated ? ':warning:' : ''
44+
rule.meta.deprecated ? ':no_entry_sign:' : ''
4845
].join('')
4946
const kindMark = [...kindMarks, TYPE_MARK[rule.meta.type]].join('')
5047
const link = `[${rule.ruleId}](./${rule.name}.md)`
@@ -225,7 +222,7 @@ if (deprecatedRules.length > 0) {
225222
rulesTableContent += `
226223
## Deprecated
227224
228-
- :warning: We're going to remove deprecated rules in the next major release. Please migrate to successor/new rules.
225+
- :no_entry_sign: We're going to remove deprecated rules in the next major release. Please migrate to successor/new rules.
229226
- :innocent: We don't fix bugs which are in deprecated rules since we don't have enough resources.
230227
231228
| Rule ID | Replaced by |
@@ -238,7 +235,7 @@ ${deprecatedRules.map(toDeprecatedRuleRow).join('\n')}
238235
rulesTableContent += `
239236
## Removed
240237
241-
- :no_entry_sign: These rules have been removed in a previous major release, after they have been deprecated for a while.
238+
- :no_entry: These rules have been removed in a previous major release, after they have been deprecated for a while.
242239
243240
| Rule ID | Replaced by | Deprecated in version | Removed in version |
244241
|:--------|:------------|:-----------------------|:-------------------|

tools/update-docs.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ For example:
1313
# rule description (vue/rule-name)
1414
1515
- :gear: This rule is included in `"plugin:vue/strongly-recommended"` and `"plugin:vue/recommended"`.
16-
- :warning: This rule was **deprecated**.
16+
- :no_entry_sign: This rule was **deprecated**.
1717
- :wrench: The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#fix) can automatically fix some of the problems reported by this rule.
1818
```
1919
*/
@@ -95,13 +95,13 @@ class DocFile {
9595
(name) => `[vue/${name}](${name}.md) rule`
9696
)
9797
notes.push(
98-
`- :no_entry_sign: This rule was **removed** in eslint-plugin-vue ${
98+
`- :no_entry: This rule was **removed** in eslint-plugin-vue ${
9999
meta.removedInVersion
100100
} and replaced by ${formatItems(replacedRules)}.`
101101
)
102102
} else {
103103
notes.push(
104-
`- :no_entry_sign: This rule was **removed** in eslint-plugin-vue ${meta.removedInVersion}.`
104+
`- :no_entry: This rule was **removed** in eslint-plugin-vue ${meta.removedInVersion}.`
105105
)
106106
}
107107
} else if (meta.deprecated) {
@@ -110,12 +110,12 @@ class DocFile {
110110
(name) => `[vue/${name}](${name}.md) rule`
111111
)
112112
notes.push(
113-
`- :warning: This rule was **deprecated** and replaced by ${formatItems(
113+
`- :no_entry_sign: This rule was **deprecated** and replaced by ${formatItems(
114114
replacedRules
115115
)}.`
116116
)
117117
} else {
118-
notes.push(`- :warning: This rule was **deprecated**.`)
118+
notes.push(`- :no_entry_sign: This rule was **deprecated**.`)
119119
}
120120
} else if (meta.docs.categories) {
121121
const presets = getPresetIds(meta.docs.categories).map(

0 commit comments

Comments
 (0)