You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/rules/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,6 @@ Rules in this category are enabled for all presets provided by eslint-plugin-vue
29
29
|:--------|:------------|:--:|:--:|
30
30
|[vue/comment-directive](./comment-directive.md)| support comment-directives in `<template>`||:warning:|
31
31
|[vue/jsx-uses-vars](./jsx-uses-vars.md)| prevent variables used in JSX to be marked as unused ||:warning:|
32
-
|[vue/script-setup-uses-vars](./script-setup-uses-vars.md)| prevent `<script setup>` variables used in `<template>` to be marked as unused ||:warning:|
33
32
34
33
</rules-table>
35
34
@@ -321,3 +320,4 @@ The following rules extend the rules provided by ESLint itself and apply them to
Copy file name to clipboardExpand all lines: docs/rules/script-setup-uses-vars.md
+12-2Lines changed: 12 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,13 @@ since: v7.13.0
9
9
10
10
> prevent `<script setup>` variables used in `<template>` to be marked as unused
11
11
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**.
13
+
14
+
::: tip
15
+
16
+
This rule is not needed when using `vue-eslint-parser` v9.0.0 or later.
17
+
18
+
:::
13
19
14
20
ESLint `no-unused-vars` rule does not detect variables in `<script setup>` used in `<template>`.
15
21
This rule will find variables in `<script setup>` used in `<template>` and mark them as used.
@@ -47,7 +53,11 @@ After turning on, `Foo` is being marked as used and `no-unused-vars` rule doesn'
47
53
48
54
## :mute: When Not To Use It
49
55
50
-
If you are not using `<script setup>` or if you do not use the `no-unused-vars` rule then you can disable this rule.
56
+
You can disable this rule in any of the following cases:
57
+
58
+
- You are using `vue-eslint-parser` v9.0.0 or later.
0 commit comments