@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
5 new15 fixed
Release note
The section about @biomejs/biome of a note shared by several packages.
Patch Changes
Fixed a bug where Biome didn't provide all the available code actions when requested by the editor.
Fixed #6492. The
organizeImportsassist action no longer duplicates a comment at the start of
the file when:BLANK_LINE:precedes the first import group.Fixed #6287 where Biome Language Server didn't adhere to the
settings.requireConfigurationoption when pulling diagnostics and code actions.
Note that for this configuration be correctly applied, your editor must support dynamic registration capabilities.Fixed #6536.
useSortedKeysno longer panics in some edge cases where object spreads are involved.Fixed #6482 where nursery rules that belonged to a domain were incorrectly enabled.
Fixed #4677: Now the
noUnusedImportsrule won't produce diagnostics for types used in JSDoc comment of exports.Added the nursery rule noExcessiveLinesPerFunction.
This rule restrict a maximum number of lines of code in a function body.The following code is now reported as invalid when the limit of maximum lines is set to 2:
function foo() { const x = 0; const y = 1; const z = 2; }The following code is now reported as valid when the limit of maximum lines is set to 3:
const bar = () => { const x = 0; const z = 2; };Fixed #6547. Now the Biome CSS parser correctly parses
@starting-stylewhen it's used inside other at-rules. The following example doesn't raise an error anymore:@layer my-demo-layer { @starting-style { div.showing { background-color: red; } } }Fixed an issue where the rule
useSemanticElementsused the incorrect range when positioning suppression comments.Fixed #6559: the error message on detected a large file was outdated and referred a removed configuration option
files.ignore.Fixed #6384. The rule
useAltTextnow emits a diagnostic with a correct range, so suppression comments can work correctly.Fixed #6508, where the rule
noUselessFragmentsincorrectly flagged Fragments containing HTML entities as unnecessary.Fixed #6515. When using the
extendsfield to extend a configuration from an NPM package, we now accept the
condition names"biome"and"default"for exporting the configuration in
thepackage.json.This means that where previously your
package.jsonhad to contain an export
declaration similar to this:{ "exports": { ".": "./biome.json" } }You may now use one of these as well:
{ "exports": { ".": { "biome": "./biome.json" } } }Or:
{ "exports": { ".": { "default": "./biome.json" } } }Added new nursery rule
noUnassignedVariables, which disallowsletorvarvariables that are read but never assigned.The following code is now reported as invalid:
let x; if (x) { console.log(1); }The following code is now reported as valid:
let x = 1; if (x) { console.log(1); }Added the new nursery rule
noImplicitCoercion, which disallows shorthand type conversions in favor of explicit type conversion functions.Example (Invalid): Boolean conversion using double negation:
!!foo; !!(foo + bar);
Example (Invalid): Number conversion using unary operators:
+foo; -(-foo); foo - 0; foo * 1; foo / 1;
Example (Invalid): String conversion using concatenation:
"" + foo; foo + ""; `` + foo; foo += "";
Example (Invalid): Index checking using bitwise NOT:
~foo.indexOf(1); ~foo.bar.indexOf(2);
Example (Valid): Using explicit type conversion functions:
Boolean(foo); Number(foo); String(foo); foo.indexOf(1) !== -1;
Fixed #6536. Now the rule
noUselessFragmentsproduces diagnostics for a top-level useless fragment that is in a return statement.Added the new nursery rule
useUnifiedTypeSignature, which disallows overload signatures that can be unified into a single signature.Overload signatures that can be merged into a single signature are redundant and should be avoided. This rule helps simplify function signatures by combining overloads by making parameters optional and/or using type unions.
Example (Invalid): Overload signatures that can be unified:
function f(a: number): void; function f(a: string): void;
interface I { a(): void; a(x: number): void; }Example (Valid): Unified signatures:
function f(a: number | string): void {}interface I { a(x?: number): void; }Example (Valid): Different return types cannot be merged:
interface I { f(): void; f(x: number): number; }Fixed #6529, where the Biome Language Server would emit an error when the user would open a file that isn't part of its workspace (
node_modulesor external files).
Now the language server doesn't emit any errors and it exits gracefully.Fixed #6500: The
useReadonlyClassPropertiesrule now correctly marks class properties asreadonlywhen they are assigned in a constructor, setter or method,
even if the assignment occurs inside an if or else block.The following code is now correctly detected by the rule:
class Price { #price: string; @Input() set some(value: string | number) { if ( value === undefined || value === null || value === "undefined" || value === "null" || Number.isNaN(value) ) { this.#price = ""; } else { this.#price = "" + value; } } }Added a new nursery rule
noAlertthat disallows the use ofalert,confirmandprompt.The following code is deemed incorrect:
alert("here!");Fixed #6459, where the Biome LSP was not taking into account the correct settings when applying
source.fixAll.biomecode action.
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.