-
-
Notifications
You must be signed in to change notification settings - Fork 760
Labels
A-ParserArea: parserArea: parserL-HTMLLanguage: HTML and super languagesLanguage: HTML and super languagesS-Bug-confirmedStatus: report has been confirmed as a valid bugStatus: report has been confirmed as a valid bug
Description
Environment information
CLI:
Version: 2.3.5
Color support: true
Platform:
CPU Architecture: x86_64
OS: linux
Environment:
BIOME_LOG_PATH: unset
BIOME_LOG_PREFIX_NAME: unset
BIOME_CONFIG_PATH: unset
BIOME_THREADS: unset
NO_COLOR: unset
TERM: st-256color
JS_RUNTIME_VERSION: v22.20.0
JS_RUNTIME_NAME: node
NODE_PACKAGE_MANAGER: npm/10.9.3
Biome Configuration:
Status: Loaded successfully
Path: biome.jsonc
Formatter enabled: true
Linter enabled: true
Assist enabled: true
VCS enabled: true
Workspace:
Open Documents: 0
What happened?
Vue parser spits the dummy with a Expected an attribute but instead found ... error when an else-if directive is proceeded by attributes.
Example:
<template>
<p v-if="true" class="flex">Hello</p>
<p v-else class="flex">World</p>
</template>
Error:
biome format --write Test.vue
Test.vue:3:13 parse ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Expected an attribute but instead found 'class="flex">World<'.
1 β <template>
2 β <p v-if="true" class="flex">Hello</p>
> 3 β <p v-else class="flex">World</p>
β ^^^^^^^^^^^^^^^^^^^
4 β </template>
5 β
βΉ Expected an attribute here.
1 β <template>
2 β <p v-if="true" class="flex">Hello</p>
> 3 β <p v-else class="flex">World</p>
β ^^^^^^^^^^^^^^^^^^^
4 β </template>
5 β
Test.vue:3:33 parse ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β expected `>` but instead found `p`
1 β <template>
2 β <p v-if="true" class="flex">Hello</p>
> 3 β <p v-else class="flex">World</p>
β ^
4 β </template>
5 β
βΉ Remove p
Playground:
Expected result
It should not throw an error.
Code of Conduct
- I agree to follow Biome's Code of Conduct
SchahinRohani
Metadata
Metadata
Assignees
Labels
A-ParserArea: parserArea: parserL-HTMLLanguage: HTML and super languagesLanguage: HTML and super languagesS-Bug-confirmedStatus: report has been confirmed as a valid bugStatus: report has been confirmed as a valid bug