@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
6 new27 fixed
Release note
Patch Changes
Added the nursery rule
useTestHooksOnTopin thetestdomain. The rule flags lifecycle hooks (beforeEach,beforeAll,afterEach,afterAll) that appear after test cases in the same block, enforcing that hooks are defined before any test case.Fixed #7882: The HTML parser will now emit better diagnostics when it encounters a void element with a closing tag, such as
<br></br>. Previously, the parser would emit multiple diagnostics with conflicting advice. Now it emits a single diagnostic that clearly states that void elements should not have closing tags.noMisleadingReturnTypeno longer misses widening from concrete object types, class instances, object literals, tuples, functions, and regular expressions to: object.A function annotated
: objectreturning an object literal:function f(): object { return { retry: true }; }Fixed #6201:
noUselessEscapeInRegexno longer flags an escaped backslash followed by-as a useless escape. Patterns like/[\\-]/are now considered valid because the second\is the escaped backslash, not an unnecessary escape of the trailing dash.Fixed #9097:
organizeImportsno longer adds a blank line between a never-matched group and a matched group.Given the following
organizeImportsoptions:{ "groups": [":NODE:", ":BLANK_LINE:", ":PACKAGE:", ":BLANK_LINE:", ":PATH:"] }The following code...
// Comment import "package"; import "./file.js";
...was organized as:
+ // Comment import "package"; + import "./file.js";
A blank line was added even though the group ':NODE:' doesn't match any imports here.
:BLANK_LINE:between never-matched groups and matched groups are now ignored.
The code is now organized as:// Comment import "package"; + import "./file.js";
Fixed Vue
v-forhandling fornoUndeclaredVariablesandnoUnusedVariables. Biome now recognizes variables declared byv-fordirectives and references to iterated values in Vue templates.noMisleadingReturnTypeno longer reports false positives when a union return type'sbooleanvariant is covered by bothtrueandfalsereturns.Added the new nursery rule
noReactStringRefs, which disallows legacy React string refs such asref="hello"andthis.refs.hello.Biome also reports template-literal refs such as
ref={`hello`}, so React code can consistently migrate to callback refs,createRef(), oruseRef().Fixed a bug in the LSP file watcher registration so Biome now watches
.biome.jsonand.biome.jsoncconfiguration files and reloads workspace settings when they change.Fixed #10011: The
noThisInStaticrule no longer reportsthiswhen it is used as the constructor target innew this(...), which is required for inherited static factory methods.Fixed #9884: The
useSortedAttributesauto-fix no longer corrupts source code when both an outer JSX element and a nested JSX-valued attribute have unsorted attributes in the same pass. Multiple unsorted groups separated by spread or shorthand attributes within the same JSX element are now reported as a single diagnostic.Fixed false positive in
noAssignInExpressionsfor Svelte{@const}blocks. Assignments in{@const name = value}are now correctly recognized as declarations rather than accidental assignments in expressions.Fixed parsing of closing parentheses in Svelte
{#each}block key expressions. Biome now correctly parses method calls and other parenthesised expressions used as keys.For example, the following snippets are now parsed correctly:
{#each numbers as number, index (number.toString())} <p>{number}</p> {/each} {#each numbers as number (key(number))} <p>{number}</p> {/each}Fixed #10135: Biome no longer crashes on missing Svelte template expressions.
The following code snippet longer panics:
{#if } <p>^ this would previously crash</p> {/if} {@const } <p> ^ this would also crash</p>Fixed #9997:
noDuplicateSelectorsno longer reports false positives for selectors inside@scopequeries. Biome now treats@scopeas a separate at-rule context, like@media,@supports,@container, and@starting-style.The following snippet is no longer flagged as a duplicate:
.Example { padding: 0; } @scope (.theme-dark) { .Example { color: white; } }Added the nursery lint rule
useMathMinMax, which prefersMath.min()andMath.max()over equivalent ternary comparisons.For example, this code:
const min = a < b ? a : b;
is much more readable when rewritten as:
const min = Math.min(a, b);
useExhaustiveSwitchCasesnow flags missingtrue/falsecases forbooleandiscriminants, including whenbooleanis a union variant.Fixed a resolver bug where packages that define a typed entry point through
package.json'smainfield but omittypeswere ignored during type-aware resolution. Type-aware rules such asnoFloatingPromisescan now inspect imports from those packages.Added support for the
corner-shapefamily of CSS properties and thesuperellipse()/squircle()value functions, sonoUnknownPropertyandnoUnknownFunctionno longer flag them as unknown.New known properties:
corner-shape,corner-block-end-shape,corner-block-start-shape,corner-bottom-left-shape,corner-bottom-right-shape,corner-bottom-shape,corner-end-end-shape,corner-end-start-shape,corner-inline-end-shape,corner-inline-start-shape,corner-left-shape,corner-right-shape,corner-start-end-shape,corner-start-start-shape,corner-top-left-shape,corner-top-right-shape,corner-top-shape.New known value functions:
superellipse(),squircle().Fixed #8062: Added support for parsing Vue
v-fordirectives more accurately.Now the rule
noStaticElementInteractionsdoesn't trigger custom elements.Fixed #9099: the HTML formatter collapsing non-text children (inline elements, Svelte expressions, comments) onto a single line when the source had them on separate lines. Biome now preserves the user's intended line breaks for exclusively non-text children.
For example, the following Svelte snippet is now preserved instead of being collapsed to
<div>{name}<!-- comment --></div>:<div> {name}<!-- comment --> </div>Similarly, HTML elements like
<span>inside a<div>are now preserved when written on their own line:<div> <span>text</span> </div>
Fixed #10039:
useReadonlyClassPropertiesnow detects unreassigned private members in class expressions and export default classes, not only in class declarations.The following patterns are now correctly flagged:
const AnonClass = class { #prop = 123; constructor() { console.log(this.#prop); } }; export default class { #prop = 123; constructor() { console.log(this.#prop); } }Improved
noUnnecessaryConditionsto detect conditions that are always truthy because they check built-in global class instances such asDate,Map,Set,WeakMap, andError.Fixed #10177: The HTML parser no longer reports lowercase
htmlordoctypetext as invalid after void elements such as<br>.Fixed #10045: the CSS formatter no longer compounds indentation inside nested functional pseudo-classes such as
:not(:where(...)),:is(:where(...)), and similar combinations. The same fix also removes one level of unnecessary indentation that was added inside any pseudo-class function whose argument list wrapped onto multiple lines, including:nth-child(... of ...),::part(...), and:active-view-transition-type(...).
The following snippet is now correctly formatted, matching Prettier.input:not( :where( [type="submit"], [type="checkbox"], [type="radio"], [type="button"], [type="reset"] ) ) { inline-size: 100%; }Fixed #10110: Biome's parser now accepts surrogate code points in JavaScript string
\u{...}escapes.Improved
noMisleadingReturnTypeto detectobjectreturn annotations that hide built-in global class instances such asDate,Map,Set,WeakMap, andError.Added two new options to
noShadow, both defaulting totrueto match typescript-eslint's behavior.Fixed #9482: Added
ignoreFunctionTypeParameterNameValueShadowoption. When enabled, parameter names inside function type annotations (e.g.(options: unknown) => void) are not flagged as shadowing outer variables.Fixed #7812: Added
ignoreTypeValueShadowoption. When enabled, a value binding that shares its name with a type-only declaration (type alias or interface) is not flagged, since types and values occupy separate namespaces in TypeScript.Fixed #6316: Biome now resolves Svelte
$storereferences to the underlyingstorebinding in semantic analysis, preventing falsenoUndeclaredVariablesdiagnostics when the store is declared.Added a new nursery rule
noExcessiveNestedCallbacks, which disallows callbacks nested deeper than the configured maximum.Fixed #9450: the HTML formatter now correctly preserves multiline formatting for nested
<template>elements (e.g.<template #body>) when the source has children on separate lines. Previously, the children were collapsed onto a single line.<template> <UModal> - <template #body> <p>content</p> </template> + <template #body> + <p>content</p> + </template> </UModal> </template>
Fixed #10024:
biome migrate eslintcorrectly migrateseslintrules that belong to multiple Biome rules.
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.