@biomejs/biome
2.6.8 · 15 Nov 2026MIT OR Apache-2.030.3M / weekRepositoryHomepagenpmAtom feed
2.6.9 is the newest release of 2.x.
In short
8 new24 fixed1 internal
Release note
Patch Changes
Added the nursery rule
useVueScopedStylesfor Vue SFCs. This rule enforces that<style>blocks have thescopedattribute (ormodulefor CSS Modules), preventing style leakage and conflicts between components.Improved plugin performance by batching all plugins into a single syntax visitor with a kind-to-plugin lookup map, reducing per-node dispatch overhead from O(N) to O(1) where N is the number of plugins.
Fixed
noUndeclaredVariableserroneously flagging functions and variables defined in the<script setup>section of Vue SFCs.Fixed an issue where the JSON reporter didn't contain the duration of the command.
Extra rule source reference.
biome migrate eslintshould do a bit better detecting rules in your eslint configurations.Fixed #9172 and #9168:
Biome now considers more constructs as valid test assertions.Previously,
assert,expectTypeOfandassertType
were not recognized as valid assertions by Biome's linting rules, producing false positives inlint/nursery/useExpectand other similar rules.Now, these rules will no longer produce errors in test cases that used these constructs instead of
expect:import { expectTypeOf, assert, assertType } from "vitest"; const myStr = "Hello from vitest!"; it("should be a string", () => { expectTypeOf(myStr).toBeString(); }); test("should still be a string", () => { assertType<string>(myStr); }); it.todo("should still still be a string", () => { assert(typeof myStr === "string"); });Added parsing support for Svelte's new comments-in-tags feature.
The HTML parser will now accept JS style comments in tags in Svelte files.
<button // single-line comment onclick={doTheThing} >click me</button> <div /* block comment */ class="foo" >text</div>Added the nursery rule
useNullishCoalescing. This rule suggests using the nullish coalescing operator (??) instead of logical OR (||) when the left operand may be nullish. This prevents bugs where falsy values like0,'', orfalseare incorrectly treated as missing. Addresses #8043// Invalid declare const x: string | null; const value = x || "default"; // Valid const value = x ?? "default";
Fixed #7813: improved the diagnostic of the rule
useExhaustiveDependencies. The diagnostic now shows the name of the variable to add to the dependency array.Added the nursery rule
noVueRefAsOperand. This rule disallows cases where a ref is used as an operand.The following code is now flagged:
import { ref } from "vue"; const count = ref(0); count++; // Should be: count.value++import { ref } from "vue"; const ok = ref(false); if (ok) { // Should be: if (ok.value) // }Fixed #9253: parsing of
@container scroll-state(...)queries.@container scroll-state(scrolled: bottom) { } @container scroll-state(stuck) { } @container scroll-state(not (stuck)) { } @container scroll-state((stuck) and (scrolled: bottom)) { } @container scroll-state((stuck) or (snapped: x)) { } @container main-layout scroll-state(not ((stuck) and (scrolled: bottom))) { }Fixed CSS formatter incorrectly collapsing selectors when a BOM (Byte Order Mark) character is present at the start of the file. The formatter now correctly preserves line breaks between comments and selectors in BOM-prefixed CSS files, matching Prettier's behavior.
Fixed #9249: The CSS formatter no longer incorrectly breaks ratio values (like
1 / -1) across lines when followed by comments.Fixed #9253: removed false-positive diagnostics for valid
@container/@supportsgeneral-enclosed queries.@container scroll-state(scrolled: bottom) { } @supports foo(bar: baz) { }Fixed #9189:
biome ciin GitHub Actions now correctly disables colors so that::error/::warningworkflow commands are not wrapped in ANSI escape codes.Fixed JSON reporter escaping of special characters in diagnostic messages. The JSON reporter now properly escapes double quotes, backslashes, and control characters in error messages and advice text, preventing invalid JSON output when diagnostics contain these characters.
Fixed an issue where the JSON reporter didn't write output to a file when
--reporter-filewas specified. The output is now correctly written to the specified file instead of always going to stdout.Fixed #9115: The
noPlaywrightMissingAwaitrule no longer produces false positives on jest-dom matchers liketoBeVisible,toBeChecked,toHaveAttribute, etc. For matchers shared between Playwright and jest-dom, the rule now checks whetherexpect()'s argument is a Playwright locator or page object before flagging. Added semantic variable resolution so that extracted Playwright locators (e.g.const loc = page.locator('.item'); expect(loc).toBeVisible()) are still correctly flagged.Fixed a false positive where
noUndeclaredVariablesreported bindings from Vue<script setup>as undeclared when used in<template>.This change ensures embedded bindings collected from script snippets (like imports and
defineModelresults) are respected by the rule.Fixed #9143 and #8849: The
noUnresolvedImportsrule no longer reports false positives for several common patterns:node:fs,node:path,node:url, and other Node.js built-in modules with thenode:prefix are now accepted.Packages that declare their TypeScript entry point via
"typings"(instead of"types") inpackage.jsonnow resolve correctly.Named imports from aliased re-export chains (e.g.
export { x as y } from "...") are now resolved correctly through the alias.Namespace re-exports (e.g.
export * as Ns from "...") are now recognized as own exports of the barrel module.
Fixed #8842: The CSS formatter now correctly formats
@container scroll-state()without adding an unwanted space between the function name and opening parenthesis.Fixed #7905. Improved the accuracy of type-aware lint rules when analyzing re-exported functions and values.
Previously, when a binding was imported from another module, its type was not correctly inferred during the type analysis phase. This caused type-aware lint rules to fail to detect issues when working with re-exported imports.
The following rules now correctly handle re-exported imports:
Example of now-working detection:
// getValue.ts export async function getValue(): Promise<number> { return 42; } // reexport.ts export { getValue } from "./getValue"; // index.ts import { getValue } from "./reexport"; // Previously: no diagnostic (type was unknown) // Now: correctly detects that getValue() returns a Promise await getValue(); // Valid - properly awaited getValue(); // Diagnostic - floating promiseFixed #8265: Biome now correctly detects test framework calls that use three arguments (label, options, callback) (e.g.,
describe("foo", { retry: 2 }, () => {})). This fixes both formatting and thenoDuplicateTestHookslint rule for test frameworks like Vitest.Fixed #9180: fixed a panic caused by an interaction between
noRedundantUseStrictand the formatterAdded the nursery rule
useNamedCaptureGroup.
The rule enforces using named capture groups in regular expressions instead of numbered ones. It supports both regex literals andRegExpconstructor calls.// Invalid: unnamed capture group /(foo)/; new RegExp("(foo)"); // Valid: named capture group /(?<id>foo)/; new RegExp("(?<id>foo)");Fixed
#9234, where some nursery rules panicked when they were configured with the optionlevelwithout the correspondingoptions.Fixed #8812:
lint/suspicious/noArrayIndexKeywill now report index usage anywhere in JSXkeytemplate or binary expressions, not only in the last visited identifier.Fixed #9250:
noVueDuplicateKeyswill no longer flag keys underwatch, preventing false positives.Added the nursery rule
useArraySometo prefer.some()over verbose existence checks likefilter(...).length > 0andfindIndex(...) !== -1, with suggestions forfind/findLastexistence checks. This also applies to ES2025 iterator helpers such asIterator.prototype.find.Added
graphqlto valid embedded graphql template tags inside JavaScript files, when the featurejavascript.experimentalEmbeddedSnippetsEnabledis enabled. This allows proper support for graphql tags used in RelayJS.Now, code snippets like the following are correctly formatted and limited:
import { graphql } from "react-relay"; const query = graphql` query { user(id: 1) { id name } } `;Added the new nursery rule
useUnicodeRegex.The rule enforces the use of the
uorvflag for regular expressions. This ensures proper handling of Unicode characters like emoji.// Invalid /foo/; new RegExp("foo", "gi"); // Valid /foo/u; new RegExp("foo", "giu");
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.