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

Deprecated vue/experimental-script-setup-vars rule #1528

Merged
merged 1 commit into from Jul 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/rules/README.md
Expand Up @@ -24,7 +24,6 @@ Enforce all the rules in this category, as well as all higher priority rules, wi
| Rule ID | Description | |
|:--------|:------------|:---|
| [vue/comment-directive](./comment-directive.md) | support comment-directives in `<template>` | |
| [vue/experimental-script-setup-vars](./experimental-script-setup-vars.md) | prevent variables defined in `<script setup>` to be marked as undefined | |
| [vue/jsx-uses-vars](./jsx-uses-vars.md) | prevent variables used in JSX to be marked as unused | |

## Priority A: Essential (Error Prevention) <badge text="for Vue.js 3.x" vertical="middle">for Vue.js 3.x</badge>
Expand Down Expand Up @@ -379,5 +378,6 @@ 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) |
2 changes: 1 addition & 1 deletion docs/rules/experimental-script-setup-vars.md
Expand Up @@ -9,7 +9,7 @@ since: v7.0.0

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

- :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"`.
- :warning: This rule was **deprecated**.

:::warning
This rule is an experimental rule. It may be removed without notice.
Expand Down
1 change: 0 additions & 1 deletion lib/configs/base.js
Expand Up @@ -16,7 +16,6 @@ module.exports = {
plugins: ['vue'],
rules: {
'vue/comment-directive': 'error',
'vue/experimental-script-setup-vars': 'error',
'vue/jsx-uses-vars': 'error'
}
}
3 changes: 2 additions & 1 deletion lib/rules/experimental-script-setup-vars.js
Expand Up @@ -21,9 +21,10 @@ module.exports = {
docs: {
description:
'prevent variables defined in `<script setup>` to be marked as undefined', // eslint-disable-line consistent-docs-description
categories: ['base'],
categories: undefined,
url: 'https://eslint.vuejs.org/rules/experimental-script-setup-vars.html'
},
deprecated: true,
schema: []
},
/**
Expand Down