@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
11 new11 fixed
Release note
Patch Changes
Added the nursery rule
noUnnecessaryTemplateExpression, which disallows template literals that only contain string literal expressions. These can be replaced with a simpler string literal.For example, the following code triggers the rule:
const a = `${"hello"}`; // can be 'hello' const b = `${"prefix"}_suffix`; // can be 'prefix_suffix' const c = `${"a"}${"b"}`; // can be 'ab'Fixed #9810:
noMisleadingReturnTypeno longer reports false positives on a getter with a matching setter in the same namespace.class Store { get status(): string { if (Math.random() > 0.5) return "loading"; return "idle"; } set status(v: string) {} }Fixed #10034:
noUselessEscapeInRegexno longer flags escapes ofClassSetReservedPunctuatorcharacters (&,!,#,%,,,:,;,<,=,>,@,`,~) insidev-flag character classes as useless. These characters are reserved as individual code points inv-mode, so the escape is required.The following pattern is now considered valid:
/[a-z\&]/v;
Added extra rule sources from ESLint CSS.
biome migrate eslintshould do a bit better detecting rules in your eslint configurations.Fixed #10032: useIframeSandbox now flags if there's no initializer value.
Added the new nursery rule
useDomNodeTextContent, which preferstextContentoverinnerTextfor DOM node text access and destructuring.For example, the following snippet triggers the rule:
const foo = node.innerText;
Added a new nursery rule
noReactNativeDeepImportsthat disallows deep imports from thereact-nativepackage. Internal paths likereact-native/Libraries/...are not part of the public API and may change between versions.For example, the following code triggers the rule:
import View from "react-native/Libraries/Components/View/View";
Added a new nursery rule
useDomQuerySelectorthat prefersquerySelector()andquerySelectorAll()over older DOM query methods such asgetElementById()andgetElementsByClassName().Fixed #9994: Biome now parses nested CSS rules correctly when declarations follow them inside embedded snippets.
Fixed #10004:
noComponentHookFactoriesno longer reports false positives for object methods and class methods.Tweaked the diagnostics range for useAltText, useButtonType, useHtmlLang, useIframeTitle, useValidAriaRole & useIfameSandbox to report on the opening tag instead of the full tag.
Fixed #10003: Biome no longer panics when parsing Svelte files containing
{#}.Added the new nursery rule
noLoopFunc. When enabled, it warns when a function declared inside a loop captures outer variables that can change across iterations.Added the nursery rule
useRegexpTestthat enforcesRegExp.prototype.test()overString.prototype.match()andRegExp.prototype.exec()in boolean contexts.test()returns a boolean directly, avoiding unnecessary computation of match results.Invalid
if ("hello world".match(/hello/)) { }Valid
if (/hello/.test("hello world")) { }Fixed #2245: Svelte
<script>tag language detection when thegenericsattribute contains>characters (e.g.,<script lang="ts" generics="T extends Record<string, unknown>">). Biome now correctly recognizes TypeScript in such script blocks.Fixed #10038:
organizeImportsnow sorts imports in TypeScript modules and declaration files.declare module "mymodule" { - import type { B } from "b"; import type { A } from "a"; + import type { B } from "b"; }Added the nursery rule
noReactNativeLiteralColors, which disallows color literals inside React Native styles.The rule belongs to the
reactNativedomain. It reports properties whose name containscolorand whose value is a string literal when they appear inside aStyleSheet.create(...)call or inside a JSX attribute whose name containsstyle.// Invalid const Hello = () => <Text style={{ backgroundColor: "#FFFFFF" }}>hi</Text>; const styles = StyleSheet.create({ text: { color: "red" }, });// Valid const red = "#f00"; const styles = StyleSheet.create({ text: { color: red }, });Added the nursery rule
noReactNativeRawText, which disallows raw text outside of<Text>components in React Native.The rule belongs to the new
reactNativedomain.// Invalid <View>some text</View> <View>{'some text'}</View>// Valid <View> <Text>some text</Text> </View>
Additional components can be allowlisted through the
skipoption:{ "options": { "skip": ["Title"] } }Added the nursery rule
noJsxLeakedDollar, which flags text nodes with a trailing$if the next sibling node is a JSX expression. This could be an unintentional mistake, resulting in a '$' being rendered as text in the output.Invalid:
function MyComponent({ user }) { return <div>Hello ${user.name}</div>; }Fixed
noMisleadingReturnTypeincorrectly flagging functions with reassignedletvariables.Fixed
#9983: Biome now parses functions declared inside Svelte#snippetblocks without throwing errors.Fixed #9810:
noMisleadingReturnTypeincorrectly flagging nested object literals with widened properties.Added the nursery rule
useReactNativePlatformComponentsthat ensures platform-specific React Native components (e.g.ProgressBarAndroid,ActivityIndicatorIOS) are only imported in files with a matching platform suffix. It also reports when Android and iOS components are mixed in the same file.The following code triggers the rule when the file does not have an
.android.jssuffix:// file.js import { ProgressBarAndroid } from "react-native";
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.