## ไบ‹่ฑก ไปฅไธ‹ใฎ `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]]