Biome 2.5.11

2.5.11

Biome CLI v2.5.11

Added 1
  • Added noAstroSetHtmlDirective nursery rule to disallow Astro's set:html directive because untrusted content can introduce cross-site scripting vulnerabilities
Fixed 11
  • 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

From Biome

2.5.11
Patch Changes
  • #11499 9743d0c Thanks @scs0209! - Fixed #11496: useValidAnchor now treats Astro JSX shorthand attributes like <a {href}> as a valid href.

  • #11437 88f805e Thanks @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 88f805e Thanks @Princesseuh! - Fixed Astro templates rejecting unclosed HTML void elements, such as {cond && <br>}.

  • #11507 e2fc036 Thanks @dyc3! - Fixed #11157: noUnusedVariables no longer reports Vue <script setup> bindings used by CSS v-bind() as unused.

  • #11398 afc4615 Thanks @dyc3! - Fixed #11389: Files passed through --stdin-file-path now use full HTML support for Astro, Svelte, and Vue when it is enabled.

  • #11526 372cd68 Thanks @dyc3! - Fixed noVueRefAsOperand to track Vue refs through declaration aliases and toRefs() properties, and to recognize useTemplateRef() results. The rule no longer reports false positives such as plain ref transfers, plain toRefs() property access, defineModel() modifiers, or the supported .effect member as operands.

    The refactor enabling these fixes also improves the performance of the rule.

  • #11458 a7cd286 Thanks @dyc3! - Fixed #11436: GritQL snippets such as export { $specifiers } from $source now match named re-exports with aliases, inline type modifiers, and multiple specifiers.

  • #11515 382b15d Thanks @dyc3! - Fixed #11390, where noFloatingPromises performed 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 6f40e82 Thanks @levrik! - Fixed noVueRefAsOperand so it no longer reports a callback parameter (e.g. from .find(), .map()) as an unwrapped ref value just because it's nested inside a ref(), computed(), or similar call.

    const result = computed(() => list.find((item) => item.label === "a"));
    

    Previously, item here was incorrectly treated as a ref value because the rule attributed it to the outer computed() call.

  • #11495 496268d Thanks @Netail! - Fixed useGraphqlNamingConvention so it no longer reports GraphQL enum value definitions with comments & descriptions and now displays a more accurate diagnostic range.

  • #11407 6ef52b0 Thanks @1678092075! - Fixed #11214: noUnusedVariables no longer reports type parameters declared by non-default function overload signatures that have an implementation.

  • #11322 5c353e6 Thanks @jp-knj! - Added a new nursery rule noAstroSetHtmlDirective, which disallows Astro's set:html directive because untrusted content can introduce cross-site scripting vulnerabilities.

    For example, the following snippet triggers the rule:

    <div set:html={content} />
    
  • #11462 18883b7 Thanks @dyc3! - Fixed #10776: useVueHyphenatedAttributes no longer reports lowercase attribute names containing punctuation, such as pt:header:data-test-id and some_attr.

  • #11476 3270ca4 Thanks @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 3e5367f Thanks @ematipico! - Added the nursery rule noUndeclaredCustomProperties, which reports references to custom properties that are not defined in available CSS, static HTML-like style attributes, or JSX string style attributes.

    For example, the following snippet triggers the rule:

    a { color: var(--undefined-color); }
    
  • #11435 7754894 Thanks @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 e6acded Thanks @aminya! - Improved the performance of useArraySortCompare by skipping type inference for calls to unrelated methods.

  • #11467 66b282c Thanks @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 db9aa2a Thanks @dyc3! - Fixed #10278: Marked the fix for noThisInStatic as unsafe by default.

  • #11502 652aedb Thanks @levrik! - noGlobalAssign no 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
New Contributors

Full Changelog: https://github.com/biomejs/biome/compare/@biomejs/biome@2.5.10...@biomejs/biome@2.5.11

View original

Upgraded? How did it go?

Discussion