Biome CLI v2.5.11
- Added noAstroSetHtmlDirective nursery rule to disallow Astro's set:html directive because untrusted content can introduce cross-site scripting vulnerabilities
- useValidAnchor now treats Astro JSX shorthand attributes like <a {href}> as a valid href
- Adjacent elements inside an Astro expression now parse as an implicit fragment instead of raising an error
- Astro templates now accept unclosed HTML void elements such as {cond && <br>}
- noUnusedVariables no longer reports Vue <script setup> bindings used by CSS v-bind() as unused
- Files passed through --stdin-file-path now use full HTML support for Astro, Svelte, and Vue when it is enabled
- noVueRefAsOperand now tracks Vue refs through declaration aliases and toRefs() properties, recognizes useTemplateRef() results, and eliminates false positives
- GritQL snippets such as export { $specifiers } from $source now match named re-exports with aliases, inline type modifiers, and multiple specifiers
- noFloatingPromises now classifies calls to non-Promise methods using targeted type information instead of expensive full type inference
- noVueRefAsOperand no longer reports callback parameters from methods like .find() and .map() as unwrapped ref values when nested inside ref(), computed(), or similar calls
- useGraphqlNamingConvention no longer reports GraphQL enum value definitions with comments and descriptions and displays a more accurate diagnostic range
- noUnusedVariables no longer reports type parameters declared by non-default function overload signatures that have an implementation
From Biome
2.5.11
Patch Changes
-
#11499
9743d0cThanks @scs0209! - Fixed #11496:useValidAnchornow treats Astro JSX shorthand attributes like<a {href}>as a validhref. -
#11437
88f805eThanks @Princesseuh! - Fixed #9944: adjacent elements inside an Astro expression now parse as an implicit fragment instead of raising an error.{options.map(() => <div /> <div /> )} -
#11437
88f805eThanks @Princesseuh! - Fixed Astro templates rejecting unclosed HTML void elements, such as{cond && <br>}. -
#11507
e2fc036Thanks @dyc3! - Fixed #11157:noUnusedVariablesno longer reports Vue<script setup>bindings used by CSSv-bind()as unused. -
#11398
afc4615Thanks @dyc3! - Fixed #11389: Files passed through--stdin-file-pathnow use full HTML support for Astro, Svelte, and Vue when it is enabled. -
#11526
372cd68Thanks @dyc3! - FixednoVueRefAsOperandto track Vue refs through declaration aliases andtoRefs()properties, and to recognizeuseTemplateRef()results. The rule no longer reports false positives such as plain ref transfers, plaintoRefs()property access,defineModel()modifiers, or the supported.effectmember as operands.The refactor enabling these fixes also improves the performance of the rule.
-
#11458
a7cd286Thanks @dyc3! - Fixed #11436: GritQL snippets such asexport { $specifiers } from $sourcenow match named re-exports with aliases, inlinetypemodifiers, and multiple specifiers. -
#11515
382b15dThanks @dyc3! - Fixed #11390, wherenoFloatingPromisesperformed expensive full type inference for calls to non-Promise methods declared on third-party TypeScript classes. The rule now classifies those calls using targeted type information. -
#11516
6f40e82Thanks @levrik! - FixednoVueRefAsOperandso it no longer reports a callback parameter (e.g. from.find(),.map()) as an unwrapped ref value just because it's nested inside aref(),computed(), or similar call.const result = computed(() => list.find((item) => item.label === "a"));Previously,
itemhere was incorrectly treated as a ref value because the rule attributed it to the outercomputed()call. -
#11495
496268dThanks @Netail! - FixeduseGraphqlNamingConventionso it no longer reports GraphQL enum value definitions with comments & descriptions and now displays a more accurate diagnostic range. -
#11407
6ef52b0Thanks @1678092075! - Fixed #11214:noUnusedVariablesno longer reports type parameters declared by non-default function overload signatures that have an implementation. -
#11322
5c353e6Thanks @jp-knj! - Added a new nursery rulenoAstroSetHtmlDirective, which disallows Astro'sset:htmldirective because untrusted content can introduce cross-site scripting vulnerabilities.For example, the following snippet triggers the rule:
<div set:html={content} /> -
#11462
18883b7Thanks @dyc3! - Fixed #10776:useVueHyphenatedAttributesno longer reports lowercase attribute names containing punctuation, such aspt:header:data-test-idandsome_attr. -
#11476
3270ca4Thanks @dyc3! - Fixed #10330: Vue interpolation delimiters now stay attached to whitespace-sensitive element boundaries and adjacent inline siblings, wrapping their expression when needed to fit the configured line width. Interpolations followed by text now also converge after one formatting pass.-<v-btn v-if="store.state.user" variant="text" to="/my-rooms" - >{{ $t("nav.my-rooms") }}</v-btn -> +<v-btn v-if="store.state.user" variant="text" to="/my-rooms">{{ + $t("nav.my-rooms") +}}</v-btn> -
#11191
3e5367fThanks @ematipico! - Added the nursery rulenoUndeclaredCustomProperties, which reports references to custom properties that are not defined in available CSS, static HTML-likestyleattributes, or JSX stringstyleattributes.For example, the following snippet triggers the rule:
a { color: var(--undefined-color); } -
#11435
7754894Thanks @levrik! - Fixed: Variables and imports used as custom Vue directives are no longer reported as unused.For example:
<script setup> const vHighlight = { mounted: (element) => { element.style.color = "red"; }, }; </script> <template> <p v-highlight>Hello</p> </template> -
#11501
e6acdedThanks @aminya! - Improved the performance ofuseArraySortCompareby skipping type inference for calls to unrelated methods. -
#11467
66b282cThanks @dyc3! - Fixed #11464: Biome now parses parenthesized object literals returned from arrow functions when they contain a conditional expression and a nested arrow function. -
#11456
db9aa2aThanks @dyc3! - Fixed #10278: Marked the fix fornoThisInStaticas unsafe by default. -
#11502
652aedbThanks @levrik! -noGlobalAssignno longer reports assignments to a Vue<script setup>binding from a template expression, when the binding's name happens to match a built-in global (e.g.open,parent,top).For example, this no longer triggers a diagnostic:
<script setup> const open = defineModel(); </script> <template> <button @click="open = !open">Toggle</button> </template>
What's Changed
- feat(js_plugin): support TypeScript plugins by @siketyan in https://github.com/biomejs/biome/pull/11418
- chore: rework skills by @ematipico in https://github.com/biomejs/biome/pull/11449
- fix(lint/js): mark no-this-in-static fixes unsafe by @dyc3 in https://github.com/biomejs/biome/pull/11456
- fix(grit): match named re-export specifiers by @dyc3 in https://github.com/biomejs/biome/pull/11458
- feat(lint): rule noUndeclaredCustomProperties by @ematipico in https://github.com/biomejs/biome/pull/11191
- feat: adds the noAstroSetHtmlDirective rule for .astro by @jp-knj in https://github.com/biomejs/biome/pull/11322
- fix(html): ignore punctuation in Vue attribute casing by @dyc3 in https://github.com/biomejs/biome/pull/11462
- ci: remove agent scan workflow by @ematipico in https://github.com/biomejs/biome/pull/11472
- chore(tools): configure the agent scan by @ematipico in https://github.com/biomejs/biome/pull/11473
- fix(yaml/parse): coverage and more fixes by @ematipico in https://github.com/biomejs/biome/pull/11471
- fix(parse/js): disambiguate parenthesized object expressions by @dyc3 in https://github.com/biomejs/biome/pull/11467
- perf(markdown): hoist list sibling scan by @dyc3 in https://github.com/biomejs/biome/pull/11466
- perf(markdown): inline common word group atom by @dyc3 in https://github.com/biomejs/biome/pull/11468
- perf(markdown): scan textual whitespace runs once by @dyc3 in https://github.com/biomejs/biome/pull/11469
- fix(noUnusedVariables): handle generic parameters in function overloads by @1678092075 in https://github.com/biomejs/biome/pull/11407
- chore: update Rust to 1.98.0 by @nhedger in https://github.com/biomejs/biome/pull/11481
- chore(deps): update rust crate papaya to 0.2.5 by @renovate[bot] in https://github.com/biomejs/biome/pull/11485
- chore(deps): update pnpm to v11.22.0 by @renovate[bot] in https://github.com/biomejs/biome/pull/11486
- chore(tools): fix agent scan configuration by @ematipico in https://github.com/biomejs/biome/pull/11489
- fix(js/parser): support Astro implicit fragments and void elements by @Princesseuh in https://github.com/biomejs/biome/pull/11437
- perf(format/markdown): avoid quadratic list formatting by @dyc3 in https://github.com/biomejs/biome/pull/11482
- fix(markdown): keep blockquote fenced code formatting idempotent by @scs0209 in https://github.com/biomejs/biome/pull/11493
- fix(graphql_analyze): useGraphqlNamingConvention exclude trivia by @Netail in https://github.com/biomejs/biome/pull/11495
- fix(lint): don’t report variables and imports used as custom Vue directives by @levrik in https://github.com/biomejs/biome/pull/11435
- fix(lint): recognize Astro JSX shorthand href in useValidAnchor by @scs0209 in https://github.com/biomejs/biome/pull/11499
- perf(analyzer): fast-path for useArraySortCompare via syntax before type inference by @aminya in https://github.com/biomejs/biome/pull/11501
- chore: changesets 3 by @Netail in https://github.com/biomejs/biome/pull/11412
- perf(markdown): reduce parser rescans by @ematipico in https://github.com/biomejs/biome/pull/11503
- perf(markdown): reduce checks and string allocations by @ematipico in https://github.com/biomejs/biome/pull/11505
- fix(noGlobalAssign): do not report assignments to bindings from Vue setup script by @levrik in https://github.com/biomejs/biome/pull/11502
- feat(analyze/vue): track embedded references in v-bind css by @dyc3 in https://github.com/biomejs/biome/pull/11507
- perf(markdown): reduce checks by @ematipico in https://github.com/biomejs/biome/pull/11506
- fix(format/html/vue): preserve Vue interpolation adjacency by @dyc3 in https://github.com/biomejs/biome/pull/11476
- perf(md): reduce checks for link lookahead by @ematipico in https://github.com/biomejs/biome/pull/11514
- fix(noVueRefAsOperand): do not report identifiers unrelated to a ref call by @levrik in https://github.com/biomejs/biome/pull/11516
- perf(type_inference): collect declaration only class methods as class members by @dyc3 in https://github.com/biomejs/biome/pull/11515
- refactor(noVueRefAsOperand): overhaul rule, and make it faster by @dyc3 in https://github.com/biomejs/biome/pull/11526
- fix(service): preserve embedded references in stateless processing by @dyc3 in https://github.com/biomejs/biome/pull/11398
- refactor(ci): agentscan setup by @MatteoGabriele in https://github.com/biomejs/biome/pull/11527
- ci: release by @github-actions[bot] in https://github.com/biomejs/biome/pull/11457
New Contributors
- @scs0209 made their first contribution in https://github.com/biomejs/biome/pull/11493
- @aminya made their first contribution in https://github.com/biomejs/biome/pull/11501
Full Changelog: https://github.com/biomejs/biome/compare/@biomejs/biome@2.5.10...@biomejs/biome@2.5.11