-
-
Notifications
You must be signed in to change notification settings - Fork 533
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 vue formatter does not recognize vue magic #2771
Comments
Your solution is the correct approach. We suggest this caveat for other files too. Would like to send a PR to the website to document it? |
I dislike the workaround and don't love the idea of enshrining it. It's superficial (e.g. it shouldn't but does allow Maybe we should just capture this issue for now as low-hanging fruit for when a plugin API debuts. |
I can accept a PR to add these globals when the file is |
I'd like to give this a shot. |
Minor update: I haven't been able to get I have a prototype that technically works, but it's a hack in |
The fix should be applied to this function |
Environment information
What happened?
I'm trying to use Biome on Vue3 files and I get some
lint/correctness/noUnusedVariables
errors ondefineProps
,defineEmits
,defineExpose
.Per the vue docs, these are not actually global functions but macros for the vue compiler.
Expected result
These (and other vue "magic") should not throw an error or there should be some recommendation for how to handle this gracefully.
My current workaround is to put this in the
biome.json
file. Note this does not detect whether it's in a<script setup>
nor the targetedvue
version, both of which affect the existence of these macros.Code of Conduct
The text was updated successfully, but these errors were encountered: