Skip to content

Commit a770662

Browse files
authored
Deprecated vue/experimental-script-setup-vars rule (#1528)
1 parent 5d1f772 commit a770662

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

docs/rules/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ Enforce all the rules in this category, as well as all higher priority rules, wi
2424
| Rule ID | Description | |
2525
|:--------|:------------|:---|
2626
| [vue/comment-directive](./comment-directive.md) | support comment-directives in `<template>` | |
27-
| [vue/experimental-script-setup-vars](./experimental-script-setup-vars.md) | prevent variables defined in `<script setup>` to be marked as undefined | |
2827
| [vue/jsx-uses-vars](./jsx-uses-vars.md) | prevent variables used in JSX to be marked as unused | |
2928

3029
## Priority A: Essential (Error Prevention) <badge text="for Vue.js 3.x" vertical="middle">for Vue.js 3.x</badge>
@@ -379,5 +378,6 @@ The following rules extend the rules provided by ESLint itself and apply them to
379378

380379
| Rule ID | Replaced by |
381380
|:--------|:------------|
381+
| [vue/experimental-script-setup-vars](./experimental-script-setup-vars.md) | (no replacement) |
382382
| [vue/name-property-casing](./name-property-casing.md) | [vue/component-definition-name-casing](./component-definition-name-casing.md) |
383383
| [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) |

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-
- :gear: This rule is included in all of `"plugin:vue/base"`, `"plugin:vue/essential"`, `"plugin:vue/vue3-essential"`, `"plugin:vue/strongly-recommended"`, `"plugin:vue/vue3-strongly-recommended"`, `"plugin:vue/recommended"` and `"plugin:vue/vue3-recommended"`.
12+
- :warning: This rule was **deprecated**.
1313

1414
:::warning
1515
This rule is an experimental rule. It may be removed without notice.

lib/configs/base.js

-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ module.exports = {
1616
plugins: ['vue'],
1717
rules: {
1818
'vue/comment-directive': 'error',
19-
'vue/experimental-script-setup-vars': 'error',
2019
'vue/jsx-uses-vars': 'error'
2120
}
2221
}

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ module.exports = {
2121
docs: {
2222
description:
2323
'prevent variables defined in `<script setup>` to be marked as undefined', // eslint-disable-line consistent-docs-description
24-
categories: ['base'],
24+
categories: undefined,
2525
url: 'https://eslint.vuejs.org/rules/experimental-script-setup-vars.html'
2626
},
27+
deprecated: true,
2728
schema: []
2829
},
2930
/**

0 commit comments

Comments
 (0)