Bun `bun lint --fix` Rewrites `<script setup>` Bindings Assigned to `const`
- Investigating(current)
- Trending(upcoming)
- Workaround available(upcoming)
- Resolved(upcoming)
Executive summary
Running `bun lint --fix` with the `no-var` rule enabled incorrectly rewrites `<script setup>` bindings in `.vue` templates that are assigned to `const`. This issue affects Windows users running Bun 1.4.4-canary.1+2596ac5d3.
No verified workaround yet
None of the linked reports describe a mitigation. Follow this incident to hear when one appears.
Official fixUnder active investigation. No report has identified a root cause yet.
Evidence
1 report · 1 GitHubShow
- [1]GitHub First report`bun lint --fix`: `no-var` rewrites `<script setup>` bindings that the `.vue` template assigns to `const`(opens GitHub issue in a new tab)
What version of Bun is running? 1.4.4-canary.1+2596ac5d3 (npm bun@1.4.4-canary.20261108.1) What platform is your computer? Microsoft Windows NT 10.0.26300.0 x64 What steps can reproduce the bug? .oxlintrc.json { "rules": { "no-var": "error" } } TemplateWrites.vue <script setup> var count = 0; var label = "a"; </script> <template> <button type="button" @click="count++">{{ count }} {{ label }}</button> <input v-model="label" /> </template> bun lint --fix TemplateWrites.vue What is the expected…
by FLPPPPPP 0upvotes 0comments
Timeline
- First report on GitHub issue
`bun lint --fix`: `no-var` rewrites `<script setup>` bindings that the `.vue` template assigns to `const`
Source