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/script-setup-uses-vars.md
+12-2
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