Packages

@biomejs/biome

2.6.8 · 15 Nov 2026MIT OR Apache-2.030.3M / weekRepositoryHomepagenpmAtom feed

Your version

2.5.13

10 Sep 2026Where it was published

2.6.9 is the newest release of 2.x.

In short

6 new22 fixed1 internal

Release note

The section about @biomejs/biome of a note shared by several packages.

Patch Changes

  • Added the nursery rule useLayeredStyles, which enforces that style rules are defined within a cascade layer and import rules to import its styles into a cascade layer.

    /* Invalid */
    @import 'foo.css';
    
    .my-style {
      color: red;
    }
    
    /* Valid */
    @import 'foo.css' layer(base);
    
    @layer base {
      .my-style {
        color: red;
      }
    }
  • Added the nursery rule useBetterDomTraversing, which prefers .firstChild, .firstElementChild, .closest(), and merged .querySelector() calls over positional DOM traversal.

    element.childNodes[0];
    element.children[0];
    element.parentElement.parentElement;
    element.querySelector("a").querySelector("b");
  • Fixed #11610, #11611, #11612, #11615, and #11616: Biome no longer fully infers an imported generic declaration just to apply its type arguments, restoring type-aware lint performance for large libraries such as Zod. This improves useRegexpExec, noFloatingPromises, noMisusedPromises, useNullishCoalescing, and noUnsafePlusOperands.

  • Fixed #7495: noUselessConstructor now ignores TypeScript constructors that forward at least one argument to super, preserving constructors that narrow the subclass's accepted parameter types. The exemption also applies when the parent and child signatures are identical; JavaScript and zero-argument forwarding behavior are unchanged.

  • Fixed #7076: useAriaPropsForRole and useFocusableInteractive no longer report non-focusable elements with role="separator". A separator with an explicit tabIndex or tabindex still requires aria-valuenow.

  • Fixed #6571 so Grit plugins can capture and inspect multiple named import specifiers.

  • Reduced unnecessary type inference when type-aware lint rules inspect members of namespace imports from libraries such as Zod. Fixed type inference so blanket re-exports do not expose default exports.

  • Added the nursery rule noXorAsExponentiation, which reports the bitwise XOR operator ^ between two decimal integer literals, where the exponentiation operator ** was likely intended.

    const kibibyte = 2 ^ 10; // 8, not 1024
  • Fixed #7192: noUnusedPrivateClassMembers now considers compound assignments such as ??= to read and use private class members.

  • Fixed #11672 and #11671 by disabling the experimental capitalized-call and effect-dependency checks in useReactCompiler, matching their exclusion from upstream's recommended lint preset. Valid calls such as Intl.NumberFormat() and captures of variables declared inside effects no longer produce these diagnostics.

  • Fixed #11653: Astro template suppression comments ({/* biome-ignore lint: reason */}) now suppress matching HTML lint diagnostics on the following line when full HTML support is enabled.

  • Improved the performance of useRegexpExec.

  • Fixed the HTML formatter inserting whitespace between adjacent Svelte expressions when their combined length exceeds the line width.

     <span>
    -  {head.median - base.median >= 0 ? "+" : "−"}
    -  {formatMs(Math.abs(head.median - base.median))}
    +  {head.median - base.median >= 0 ? "+" : "−"}{formatMs(Math.abs(head.median - base.median))}
     </span>
  • Fixed #11644: useHeadingContent no longer reports headings that render their text with a directive: set:html and set:text in Astro files, v-html and v-text in Vue files.

    <h1 set:html={heading} />
    <h2 set:text={heading}></h2>
    <template>
      <h1 v-html="heading"></h1>
      <h2 v-text="heading"></h2>
    </template>
  • Improved the performance of Biome Formatter up to ~50% in some cases.

  • Fixed #6974, where noUnusedPrivateClassMembers incorrectly reported TypeScript private constructor properties read through object destructuring from this as unused.

  • Fixed #11605: Type inference now infers the type of an unannotated callback parameter from the signature of the function the callback is passed to, and honours explicit type arguments on call expressions. This improves type-aware analysis for noBaseToString, noFloatingPromises, noMisleadingReturnType, noMisusedPromises, noUnnecessaryConditions, noUnsafePlusOperands, noUselessTypeConversion, useArrayFind, useArraySortCompare, useAwaitThenable, useDisposables, useExhaustiveSwitchCases, useIncludes, useNullishCoalescing, useRegexpExec, and useStringStartsEndsWith. For example, noFloatingPromises can now detect Promises reached through such parameters:

    interface Context {
      doSomething(): Promise<void>;
    }
    
    declare function test(callback: (ctx: Context) => Promise<void>): void;
    
    test(async (ctx) => {
      ctx.doSomething(); // now reported as a floating promise
    });
  • Fixed parsing of unquoted CSS URLs beginning with @ or !, such as url(@/assets/icon.svg) and url(!font.woff2). Preserved escaped and non-ASCII whitespace in raw URLs during formatting.

    -background-image: url(image\);
    +background-image: url(image\ );
  • Added the nursery rule noUnsafeIframeSandbox, which reports iframe elements whose sandbox attribute combines allow-scripts and allow-same-origin, since that combination lets the embedded document remove its own sandboxing.

    <iframe src="https://example.com" sandbox="allow-scripts allow-same-origin" />
  • Added the recommended noSvelteAtHtmlTags nursery rule, which reports Svelte {@html} tags that render unescaped HTML.

  • Fixed #6782: GritQL plugins now match captured JSX component names against code snippets such as React.Fragment.

  • Fixed #11678: useReactCompiler no longer panics on files that contain non-ASCII characters. This bumps the React Compiler version.

  • Added the nursery Vue-domain rule useVueBaseImport rule, which enforces importing Vue APIs from vue instead of internal @vue/* packages.

  • Fixed useReactCompiler silently producing no diagnostics in WebAssembly builds, including the playground.

  • Improved linting performance for large CSS and JSON files.

  • Fixed #7527: suppression actions for diagnostics emitted on comments are now inserted before the diagnostic comment. In particular, suppressing noTsIgnore now places the biome-ignore comment before @ts-ignore.

  • Fixed #8629, where noUnusedPrivateClassMembers incorrectly reported used private TypeScript method overload signatures as unused.

  • Improved the performance of noExcessiveLinesPerFile when skipBlankLines is false.

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.