Environment information
Details
CLI:
Version: 2.5.0
Color support: true
Platform:
CPU Architecture: x86_64
OS: windows
Environment:
BIOME_DISTRIBUTION: npm
BIOME_LOG_PATH: unset
BIOME_LOG_PREFIX_NAME: unset
BIOME_LOG_LEVEL: unset
BIOME_LOG_KIND: unset
BIOME_CONFIG_PATH: unset
BIOME_THREADS: unset
BIOME_WATCHER_KIND: unset
BIOME_WATCHER_POLLING_INTERVAL: unset
NO_COLOR: unset
TERM: xterm-256color
JS_RUNTIME_VERSION: v26.3.0
JS_RUNTIME_NAME: node
NODE_PACKAGE_MANAGER: pnpm/11.5.3
Biome Configuration:
Status: Loaded successfully.
Path: biome.json
Formatter enabled: true
Linter enabled: true
Assist enabled: true
VCS enabled: true
HTML full support enabled: true
Workspace:
Open Documents: 0
What happened?
Hi!
Here are the steps to reproduce:
- enable this in biome.json:
{
"html": {
"experimentalFullSupportEnabled": true,
"formatter": {
"enabled": true,
"indentScriptAndStyle": true
}
},
- create a
.svelte file with these contents:
<script lang="ts">
const href = "example.com";
</script>
<a {href}>test</a>
Because the href variable has the same name as the href attribute, we can use the shorthand attribute syntax to avoid writing href={href} instead we just write {href}.
This is a core svelte feature and in fact if you run the biome format command this<a href={href}>test</a> is turned into <a {href}>test</a>.
The following rule is triggered:
Provide a href attribute for the a element. (biome lint/a11y/useValidAnchor)
Thank you!
Expected result
lint/a11y/useValidAnchor rule should not be triggered.
Code of Conduct
Environment information
Details
What happened?
Hi!
Here are the steps to reproduce:
{ "html": { "experimentalFullSupportEnabled": true, "formatter": { "enabled": true, "indentScriptAndStyle": true } },.sveltefile with these contents:Because the
hrefvariable has the same name as thehrefattribute, we can use the shorthand attribute syntax to avoid writinghref={href}instead we just write{href}.This is a core svelte feature and in fact if you run the biome format command this
<a href={href}>test</a>is turned into<a {href}>test</a>.The following rule is triggered:
Provide a href attribute for the a element. (biome lint/a11y/useValidAnchor)Thank you!
Expected result
lint/a11y/useValidAnchor rule should not be triggered.
Code of Conduct