@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 new52 fixed1 internal
Release note
The section about @biomejs/biome of a note shared by several packages.
Patch Changes
Added the nursery rule
noReturnInFinally. This rule disallows return statements inPromise.prototype.finally()callbacks, including inside nested blocks and conditional branches. Returns in nested functions are ignored by the rule.// Invalid: return in finally callback Promise.resolve(1).finally(() => { return 2 }) // Valid: no return in finally callback Promise.resolve(1).finally(() => { console.log(2) })Returning a value from a
Promise.prototype.finally()callback does not replace the original promise's fulfillment value, which can be confusing. Returned promises and thenables are awaited, and their rejection rejects the resulting promise.Added the nursery rule
noSvelteAtDebugTags, which disallows Svelte's{@debug}tag.<!-- Invalid: leftover debugging tag --> {@debug user}The
{@debug}tag is a debugging aid and should be removed once you no longer need it, as it should not remain in production code. The rule provides a safe fix that removes the tag.Fixed #8471:
source.fixAll.biomeignoredformatter.formatWithErrors. It now applies safe fixes without formatting files that have parse errors when the option is disabled.Fixed #7771: Grit plugins that use
sequentialno longer panic when Biome processes files.Fixed validation of
readonlyandaccessormodifiers: combining them in either order now reports that they cannot be used together.Fixed #11423: Multiline template interpolations now preserve the indentation of their closing brace when the source indentation is not a multiple of
tabWidth.const value = ` ${ condition ? "yes" : "no" -} + } `;Fixed #11763: TypeScript class members using
override accessor, such asoverride accessor value = 1, now parse correctly. The reversed order,accessor override, now reports thatoverridemust precedeaccessor.Fixed #10248:
noUselessFragmentsnow allows fragments with props in Astro files, such as<Fragment slot="name">{text}</Fragment>inside template expressions.Fixed #7573: added the
requireExplicitCaseoption touseExhaustiveSwitchCases. When set totrue, the rule reports missing cases even when the switch has adefaultclause, so you can keep a runtime fallback while checking that every value in the union has its own case. The option defaults tofalse.Fixed #8347: the fix from
useConsistentArrowReturnnow parenthesizes returned expressions that begin with object literals before removing the arrow function body braces, preventing invalid output for expressions such as object property access.Fixed #11782:
noUndeclaredCustomPropertiescould hang while checking stylesheets imported by JavaScript modules with many shared dependencies.Fixed #7984: The fix from
useSimplifiedLogicExpressionnow preserves line breaks in multiline conditions with line comments, preventing the right-hand side condition from being commented out.Fixed #7304: the HTML formatter now preserves authored segment breaks between CJK characters, and next to CJK punctuation, instead of replacing them with spaces.
<div lang="zh-Hant-TW"> - 這個段落是那麼長, 在一行寫不行。 + 這個段落是那麼長, + 在一行寫不行。 </div>
Fixed #11747: formatting and checking large parenthesized object expressions no longer exhibit quadratic slowdowns.
Fixed #8177: code actions no longer modify the wrong part of Vue, Svelte, or Astro files when experimental full HTML support is disabled.
Fixed #10247:
biome check --write/biome lint --writenow correctly writes fixes for code inside an HTML attribute expression (for example a Svelteonclick={...}handler, or a mustache expression like{count}), instead of silently reporting the diagnostic as fixable and applying nothing.For example, running
biome lint --write --unsafeforuseBlockStatements(an unsafe fix) on this Svelte component used to leave the file unchanged:<button onclick={() => { if (open) close(); }}>Close</button>Fixed #11453:
useConsistentTestItnow updates imports alongside calls, preserving the original export through an alias. The rule ignores locally declared functions and withholds fixes when the preferred name would conflict with another binding or global reference.Fixed the HTML formatter incorrectly applying native HTML element formatting to PascalCase component names such as
<Ul>and<Body>in Vue, Svelte, and Astro files.-<Body> - <div>content</div> -</Body> +<Body><div>content</div></Body>
Fixed the HTML formatter incorrectly applying SVG block formatting to unknown elements whose names matched SVG element names.
-<foreignobject> - <div>content</div> -</foreignobject> +<foreignobject><div>content</div></foreignobject>
Fixed #8893:
useImportExtensionsno longer suggests adding.tsto.jsximports when a colocated.d.tsfile provides type declarations.Added the nursery rule useConsistentFunctionStyle, which requires a consistent style for defining functions.
By default, the rule reports the following declaration because it requires a function expression assigned to a variable:
function greet() { return "Hello"; }Fixed #8980: suppression comments targeting the entire
assistcategory are now respected, includingbiome-ignore-all assistwhen runningcheck.Fixed dashed utility base names in the Tailwind parser, including
border-bs,font-features, andscrollbar-thumb. Classes such asmin-inline-[12rem]now preserve the complete base name and parse the arbitrary value separately.The rule
useIncludesnow also reportslastIndexOf()comparisons andsome()calls with a strict-equality callback.arr.lastIndexOf(x) !== -1 arr.some(item => item === x)
Fixed #6888. GritQL plugins can now use
containson import-clause metavariables such as$clauseinimport $clause from "module"patterns.Fixed #11786:
useAnchorContentnow reports anchors without accessible content in HTML, Astro, Vue, and Svelte even when they have anaria-label,aria-labelledby, ortitleattribute, matching JSX behavior.Added the new nursery rule
noVueUndeclaredDirectives, which reports custom Vue directives that are not declared by a<script setup>binding, the component'sdirectivesoption, or the rule'sglobalsoption. Closes #11478.<template> <!-- v-highlight is not declared anywhere --> <div v-highlight></div> </template>
Aliased named imports in single-file components are now tracked under their local name, so
noUndeclaredVariablesrecognizesvHighlightinimport { highlight as vHighlight } from "./directives".Fixed #7795. The
noJsxLiteralsrule now ignores surrounding whitespace when matching literals againstallowedStrings.Fixed false positives in
useExhaustiveSwitchCaseswhen numeric cases use different spellings of the same value. For example,case 0x1now covers the numeric literal type1.Fixed #7880:
noUselessStringConcatno longer reports literal concatenations split across multiple lines when a numeric literal ends the chain.Improved performance of the HTML formatter for documents that contain many HTML-native or SVG-native tags.
Fixed #7949:
useReadonlyClassPropertiesnow reports static class properties that are never reassigned.Fixed #7644:
useImportExtensionsnow resolves path aliases declared by referenced TypeScript project configurations.Fixed a false positive in
useTailwindShorthandClassesfor strings in conditional tests, such ascn(m === "w-2 h-2" ? "bg-red-800" : "bg-red-400").Fixed #7783:
noNoninteractiveElementInteractionsno longer reports event handlers on native<dialog>elements.Fixed #11730:
useExhaustiveSwitchCasesreports missing cases when iterating over a class property withfor...of.Fixed #11716: the
noUnknownAttributerule now accepts fullscreen event handlers, thecredentiallessiframe property, and the SVGmaskTypeproperty when the React dependency range allows React 19.3 or later. ThecredentiallessandmaskTypeproperties are restricted to<iframe>and<mask>elements, respectively.Fixed #11692:
noFloatingPromisesnow detects unhandled promises returned through generic method signatures, including Playwright fixtures.Fixed #7747:
useExhaustiveSwitchCasesnow reports missing cases for literal unions derived from const tuples with(typeof values)[number]and objects withkeyof typeof object.Other type-aware rules, including
noFloatingPromisesandnoUselessTypeConversion, also recognize supported indexed-access results.Fixed redundant parentheses around binary and logical unary operands with leading line comments.
!( // leading - (a || b) + a || b );
Fixed #7722:
noUnusedImportsno longer reports type-only imports used in computed names of declared class properties.Fixed #6390: Biome now offers suppression actions for
noDynamicNamespaceImportAccessin editors.Fixed #7533:
noDescendingSpecificityno longer compares selector specificity across separate cascade layer blocks.Fixed #6206:
useUniqueElementIdsno longer reports static IDs on elements in SVG contexts.<svg> <defs> <pattern id="dots" width="10" height="10" /> </defs> <rect fill="url(#dots)" width="100%" height="100%" /> </svg>Fixed #5447, so the GitHub reporter now associates annotations with the correct files when Biome runs from a nested directory.
Fixed #7816:
useHookAtTopLevelno longer reports methods named like hooks when called on another function's result, such asReactotron.configure(...).useReactNative(...).Removed special HTML formatter handling for the obsolete
<listing>element.Fixed an issue where Grit plugin code fixes weren't available as editor code actions.
Fixed #11722: the JavaScript formatter inserts a newline before the closing angle bracket when a leading comment forces type arguments onto multiple lines.
type Foo = Record< // comment string, - number>; + number +>;
Added the nursery rule
noJsonUnsafeValues, which disallows JSON values that are unsafe to use between different tools or languages.Invalid:
[ 2e308, // Number evaluating to Infinity -2e308, // Number evaluating to -Infinity "\ud83d", // String with lone surrogate 1e-400, // Unsafe zero (too small, will evaluate to 0) 9007199254740992, // Unsafe integer (outside safe integer range) 2.2250738585072009e-308, // Subnormal number ]
Fixed #8574: the JavaScript formatter sometimes added extra parentheses and moved comments when formatting multiline expressions after operators such as
!. Comments now stay beside the values they describe, without an extra pair of parentheses.!( - ( - cond1 || // force this to be multi line - cond3 - ) // comment + cond1 || // force this to be multi line + cond3 // comment );
Fixed #7711:
biome lint --suppressno longer fails with conflicting rule fixes when multiple diagnostics target a declaration preceded by a multiline comment.Added the nursery rule
noObsoleteTags, which reports obsolete HTML elements in HTML and JSX, such as<font color="red">Text</font>.Fixed #7363: Biome GritQL plugins now match TypeScript interface snippets such as
interface $name { $body }.Added support for
suite()as an alias ofdescribe()across test analysis rules and formatter. Rules now recognizesuite,fsuite,xsuite, andtest.suiteblocks. The formatter recognises them as test declarations.Fixed #7727: GritQL snippets such as
import $what from $wherenow match namespace imports, including type-only imports. Explicitimport type $what from $wherepatterns also match type-only named and namespace imports.Fixed #7603:
useSingleJsDocAsteriskno longer reports asterisks that are part of JSDoc comment content, such as italic text, as extra line markers.Fixed #11704: files re-included by negation patterns in a nested
.gitignoreare processed whenvcs.useIgnoreFileis enabled, even when the ignore file contains*.Fixed #8573: own-line comments before binary operators stay above the operator when
javascript.formatter.operatorLinebreakis"before".foo - || // comment - bar; + // comment + || bar;
Added the nursery rule
useConsistentObjectKeys, which requires JSON object keys to follow a consistent Unicode representation.
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.