Packages

@biomejs/biome

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

Your version

2.4.7

13 Mar 2026Where it was published

2.6.9 is the newest release of 2.x.

In short

4 new28 fixed

Release note

Patch Changes

  • Added new nursery lint rule useBaseline for CSS. The rule reports when CSS properties, property values, at-rules, media conditions, functions, or pseudo-selectors are not part of the configured Baseline tier.

    For example, at the time of writing, the rule will trigger for the use of accent-color because it has limited availability:

    a {
      accent-color: bar;
    }
  • Added the nursery rule useImportsFirst that enforces all import statements appear before any non-import statements in a module. Inspired by the eslint-plugin-import import/first rule.

    // Invalid
    import { foo } from "foo";
    const bar = 1;
    import { baz } from "baz"; // ← flagged
    
    // Valid
    import { foo } from "foo";
    import { baz } from "baz";
    const bar = 1;
  • Fixed noUndeclaredVariables from erroneously flagging props only used in the template section in Vue SFCs

  • Fixed #9432: Values referenced as a JSX element in Astro/Vue/Svelte templates are now correctly detected; noUnusedImports and useImportType rules no longer reports these values as false positives.

  • Extra rule source references. biome migrate eslint should do a bit better detecting rules in your eslint configurations.

  • Fixed biomejs/biome-vscode#959: LSP now correctly resolves project directory when configurationPath points to a configuration file outside the workspace.

  • Fixed #9385: noUselessEscapeInString no longer incorrectly flags valid CSS hex escapes (e.g. \e7bb) as useless. The rule now recognizes all hex digits (0-9, a-f, A-F) as valid escape characters in CSS strings.

  • Fixed #9131, #9112, #9166: the formatter no longer crashes or produces corrupt output when a JS file with experimentalEmbeddedSnippetsEnabled contains non-embedded template literals alongside embedded ones (e.g. console.log(\test`)next tographql(`...`)`).

  • Fixed #6921: noShadow no longer incorrectly flags destructured variable bindings in sibling scopes as shadowing. Object destructuring, array destructuring, nested patterns, and rest elements are now properly recognized as declarations.

  • Fixed #7125: The rule noShadow no longer incorrectly flags parameters in TypeScript constructor and method overload signatures.

  • Fixed #5279: Tabs in diagnostic diff output are now rendered at a consistent width across context and changed lines, fixing visual misalignment when source files use tab indentation.

  • Fixed #8897: Biome now parses @utility names containing / when Tailwind directives are enabled.

  • Improved CSS parser recovery for invalid unicode-range values that mix wildcard ranges with range intervals. For example, Biome now reports clearer diagnostics for invalid syntax like:

    unicode-range: U+11???-2??;
    unicode-range: U+11???-;

    with diagnostics such as:

    × Wildcard ranges cannot be combined with a range interval.
      > unicode-range: U+11???-2??;
                                ^
    
    × Expected a codepoint but instead found ';'.
      > unicode-range: U+11???-;
                                 ^
  • Fixed #9349: Biome now correctly handles Vue dynamic :alt and v-bind:alt bindings in useAltText, preventing false positives in .vue files.

  • Fixed #9210: useAnchorContent no longer reports an accessibility error for Astro Image components inside links when they provide non-empty alt text.

  • Fixed #7214: useOptionalChain now detects optional chain patterns that don't start at the beginning of a logical AND expression. For example, bar && foo && foo.length is now correctly flagged and fixed to bar && foo?.length.

  • Fixed #9245: the useSemanticElements rule no longer suggests <output> for role="status" and role="alert". The <output> element is only a relatedConcept of these roles, not a direct semantic equivalent. These roles are now excluded from suggestions, aligning with the intended behavior of the upstream prefer-tag-over-role rule.

  • Fixed #5212: useSemanticElements no longer reports a diagnostic when a semantic element already has its corresponding role attribute (e.g. <nav role="navigation">, <footer role="contentinfo">). These cases are now correctly left to noRedundantRoles.

  • Fixed #9357. Improved the information emitted by some diagnostics.

  • Fixed #9433: noBlankTarget now correctly handles dynamic href attributes, such as <a href={company?.website} target="_blank">.

  • Expanded the noNegationElse rule to cover the inequality & strict inequality operator.

  • Fixed #7583:
    organizeImports now
    sorts named specifiers inside bare exports and merges bare exports.

    - export { b, a };
    - export { c };
    + export { a, b, c };

    Also, organizeImports now correctly adds a blank line between an import chunk
    and an export chunk.

      import { A } from "package";
    +
      export { A };
  • When the domains field is set in the configuration file, domains is now automatically enabled when Biome detects certain dependencies in package.json.

  • Fixed #6606: The type inference engine now resolves Record<K, V> types, synthesizing them as object types with index signatures. This improves accuracy for type-aware lint rules such as noFloatingPromises, noMisusedPromises, useAwaitThenable, and useArraySortCompare when operating on Record-typed values.

  • Fixed #7516: noUnusedImports no longer reports a false positive when a local variable shadows an imported type namespace that is still used in a type annotation.

  • Improved the detection of variables inside Astro files. Now the rule noUnusedVariables and others will trigger fewer false positives.

  • Fixed #9314. Now Biome doesn't panic when useAriaPropsForRole is configured using an object.

  • Fixed #9464: Temporal is now correctly detected as a global.

  • Added the nursery rule noTopLevelLiterals. It requires the root-level value to be an array or object.

    Invalid:

    "just a string"
  • Fixed #9310. Now the HTML formatter doesn't mangle elements that are followed by self-closing elements such as <br> or <img>.

  • Slightly increased the performance of the CLI in projects that have more than ~2K files.

  • Added the nursery rule noEmptyObjectKeys, which disallows the use of empty keys in JSON objects.

    Invalid:

    {
      "": "value"
    }

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.