## ไบ่ฑก
ไปฅไธใฎ `increment` ใจ `count` ใ[[Biome]]ใฎlintใซๅผใฃใใใใ
```html
<script setup lang="ts">
const count = ref(0);
defineProps<{
key: string;
}>();
const increment = () => {
// count.value++;
// count.value++;
};
const xs = [1, 2, 3];
xs.forEach((x) => {
console.log(x);
});
</script>
<template>
<div>
<div>count: {{count}}</div>
<button @click="increment">Increment</button>
</div>
</template>
<style scoped>
.button {
margin-top: 0;
}
</style>
```
ใณใใณใๅฎ่ก็ตๆใ
```console
$ bunx biome lint
biome.json:2:14 deserialize โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โน The configuration schema version does not match the CLI version 2.3.5
1 โ {
> 2 โ "$schema": "https://biomejs.dev/schemas/2.3.0/schema.json",
โ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3 โ "vcs": {
4 โ "enabled": true,
โน Expected: 2.3.5
Found: 2.3.0
โน Run the command biome migrate to migrate the configuration file.
app/app.vue:2:7 lint/correctness/noUnusedVariables FIXABLE โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ This variable count is unused.
1 โ <script setup lang="ts">
> 2 โ const count = ref(0);
โ ^^^^^
3 โ defineProps<{
4 โ key: string;
โน Unused variables are often the result of an incomplete refactoring, typos, or other sources of bugs.
โน Unsafe fix: If this is intentional, prepend count with an underscore.
1 1 โ
2 โ - constยทcountยท=ยทref(0);
2 โ + constยท_countยท=ยทref(0);
3 3 โ defineProps<{
4 4 โ key: string;
app/app.vue:7:7 lint/correctness/noUnusedVariables FIXABLE โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ This variable increment is unused.
5 โ }>();
6 โ
> 7 โ const increment = () => {
โ ^^^^^^^^^
8 โ // count.value++;
9 โ // count.value++;
โน Unused variables are often the result of an incomplete refactoring, typos, or other sources of bugs.
โน Unsafe fix: If this is intentional, prepend increment with an underscore.
5 5 โ }>();
6 6 โ
7 โ - constยทincrementยท=ยท()ยท=>ยท{
7 โ + constยท_incrementยท=ยท()ยท=>ยท{
8 8 โ // count.value++;
9 9 โ // count.value++;
Checked 6 files in 2ms. No fixes applied.
Found 2 warnings.
Found 1 info.
```
`biome.json`
```json
{
"$schema": "https://biomejs.dev/schemas/2.3.5/schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
},
"files": {
"ignoreUnknown": false
},
"formatter": {
"enabled": true,
"indentStyle": "space"
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"correctness": {
"noUnusedImports": "warn"
}
}
},
"javascript": {
"formatter": {
"quoteStyle": "double"
}
},
"html": {
"formatter": {
"enabled": true
},
"experimentalFullSupportEnabled": true
},
"assist": {
"enabled": true,
"actions": {
"source": {
"organizeImports": "on"
}
}
}
}
```
### ็ฐๅข
| ๅฏพ่ฑก | ใใผใธใงใณ |
| -------------- | ---------- |
| [[Biome]] | 2.3.5 |
| [[Vue]] | 3.5.24 |
| [[Nuxt]] | 4.2.1 |
| [[TypeScript]] | 5.9.3 |
## ๅๅ
ไปๆงใ
> This is expected behavior because our support for Vue is only partial. We only parse the script section right now. We recommend disabling this rule and a couple others for .vue files
>
> See:ย [https://biomejs.dev/internals/language-support/#html-super-languages-support](https://biomejs.dev/internals/language-support/#html-super-languages-support)
>
> *[False positive: Unused function in Vue SFC script section used in template ยท Issue #7139 ยท biomejs/biome](https://github.com/biomejs/biome/issues/7139#issuecomment-3163694953) *
## ่งฃๆฑบๆนๆณ
[[noUnusedVariables]]ใ็กๅนใซใใใ
```diff
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"correctness": {
- "noUnusedImports": "warn"
+ "noUnusedImports": "warn",
+ "noUnusedVariables": "off"
}
}
},
```
[[Biome]]ใจใใฆใฏๆชไฝฟ็จๅคๆฐใๆค็ฅใงใใชใใชใใใ[[TypeScript]]ใฎๆนใงๆค็ฅใใฆใใใใฎใงๅ้กใฏใชใใ
![[2025-11-12-07-48-07.avif]]