From 6e95687107f715daf7557513cac02893d351e5e8 Mon Sep 17 00:00:00 2001 From: Flo Edelmann Date: 2023年7月11日 11:17:49 +0200 Subject: [PATCH 1/2] Allow deprecated rules in configs (does not change current configs at all) --- tools/lib/categories.js | 4 +--- tools/update-docs-rules-index.js | 5 +---- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/tools/lib/categories.js b/tools/lib/categories.js index e98c442b3..e59790168 100644 --- a/tools/lib/categories.js +++ b/tools/lib/categories.js @@ -56,8 +56,6 @@ module.exports = categoryIds .map((categoryId) => ({ categoryId, title: categoryTitles[categoryId], - rules: (categoryRules[categoryId] || []).filter( - (rule) => !rule.meta.deprecated - ) + rules: categoryRules[categoryId] || [] })) .filter((category) => category.rules.length> 0) diff --git a/tools/update-docs-rules-index.js b/tools/update-docs-rules-index.js index 3a5eb600c..1073d30a8 100644 --- a/tools/update-docs-rules-index.js +++ b/tools/update-docs-rules-index.js @@ -15,10 +15,7 @@ const VUE2_EMOJI = ':two:' // ----------------------------------------------------------------------------- const categorizedRules = rules.filter( - (rule) => - rule.meta.docs.categories && - !rule.meta.docs.extensionRule && - !rule.meta.deprecated + (rule) => rule.meta.docs.categories && !rule.meta.docs.extensionRule ) const uncategorizedRules = rules.filter( (rule) => From ede332601f4a821c184303ed238c1959628a4a25 Mon Sep 17 00:00:00 2001 From: Flo Edelmann Date: 2023年7月11日 11:23:38 +0200 Subject: [PATCH 2/2] Change emojis for deprecated and removed rules in docs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rules with type "problem": `:warning:` ⚠️ → `:warning:` ⚠️ (no change) Deprecated rules: `:warning:` ⚠️ → `:no_entry_sign:` 🚫 Removed rules: `:no_entry_sign:` 🚫 → `:no_entry:` ⛔ --- docs/rules/experimental-script-setup-vars.md | 2 +- docs/rules/index.md | 4 ++-- docs/rules/name-property-casing.md | 2 +- docs/rules/no-confusing-v-for-v-if.md | 2 +- docs/rules/no-invalid-model-keys.md | 2 +- docs/rules/no-unregistered-components.md | 2 +- docs/rules/script-setup-uses-vars.md | 2 +- docs/rules/v-on-function-call.md | 2 +- tools/update-docs-rules-index.js | 6 +++--- tools/update-docs.js | 10 +++++----- 10 files changed, 17 insertions(+), 17 deletions(-) diff --git a/docs/rules/experimental-script-setup-vars.md b/docs/rules/experimental-script-setup-vars.md index 7a77d941d..e0455b1d4 100644 --- a/docs/rules/experimental-script-setup-vars.md +++ b/docs/rules/experimental-script-setup-vars.md @@ -9,7 +9,7 @@ since: v7.0.0 > prevent variables defined in ` setup>` to be marked as undefined -- :no_entry_sign: This rule was **removed** in eslint-plugin-vue v9.0.0. +- :no_entry: This rule was **removed** in eslint-plugin-vue v9.0.0. This rule will find variables defined in ` setup="args">` and mark them as defined variables. diff --git a/docs/rules/index.md b/docs/rules/index.md index 1ef0ef39d..776b68433 100644 --- a/docs/rules/index.md +++ b/docs/rules/index.md @@ -330,7 +330,7 @@ The following rules extend the rules provided by ESLint itself and apply them to ## Deprecated -- :warning: We're going to remove deprecated rules in the next major release. Please migrate to successor/new rules. +- :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 | @@ -341,7 +341,7 @@ The following rules extend the rules provided by ESLint itself and apply them to ## Removed -- :no_entry_sign: These rules have been removed in a previous major release, after they have been deprecated for a while. +- :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 | |:--------|:------------|:-----------------------|:-------------------| diff --git a/docs/rules/name-property-casing.md b/docs/rules/name-property-casing.md index a69855f7e..d80181191 100644 --- a/docs/rules/name-property-casing.md +++ b/docs/rules/name-property-casing.md @@ -9,7 +9,7 @@ since: v3.8.0 > enforce specific casing for the name property in Vue components -- :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. +- :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. ## :book: Rule Details diff --git a/docs/rules/no-confusing-v-for-v-if.md b/docs/rules/no-confusing-v-for-v-if.md index c9d72dbb4..cbcdbc657 100644 --- a/docs/rules/no-confusing-v-for-v-if.md +++ b/docs/rules/no-confusing-v-for-v-if.md @@ -9,7 +9,7 @@ since: v3.0.0 > disallow confusing `v-for` and `v-if` on the same element -- :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. +- :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. ## :book: Rule Details diff --git a/docs/rules/no-invalid-model-keys.md b/docs/rules/no-invalid-model-keys.md index 34f65d88a..720d23b8d 100644 --- a/docs/rules/no-invalid-model-keys.md +++ b/docs/rules/no-invalid-model-keys.md @@ -9,7 +9,7 @@ since: v7.9.0 > require valid keys in model option -- :warning: This rule was **deprecated** and replaced by [vue/valid-model-definition](valid-model-definition.md) rule. +- :no_entry_sign: This rule was **deprecated** and replaced by [vue/valid-model-definition](valid-model-definition.md) rule. ## :book: Rule Details diff --git a/docs/rules/no-unregistered-components.md b/docs/rules/no-unregistered-components.md index dcbd9bc47..3f373d480 100644 --- a/docs/rules/no-unregistered-components.md +++ b/docs/rules/no-unregistered-components.md @@ -9,7 +9,7 @@ since: v7.0.0 > disallow using components that are not registered inside templates -- :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. +- :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. ## :book: Rule Details diff --git a/docs/rules/script-setup-uses-vars.md b/docs/rules/script-setup-uses-vars.md index f4d68926a..a26a19f60 100644 --- a/docs/rules/script-setup-uses-vars.md +++ b/docs/rules/script-setup-uses-vars.md @@ -9,7 +9,7 @@ since: v7.13.0 > prevent ` setup>` variables used in `