@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
7 new14 fixed
Release note
Patch Changes
Fixed #6432:
useImportExtensionsnow works correctly with aliased paths.Fixed #6648, where Biome's
noUselessFragmentscontained inconsistencies with ESLint for fragments only containing text.Previously, Biome would report that fragments with only text were unnecessary under the
noUselessFragmentsrule. Further analysis of ESLint's behavior towards these cases revealed that text-only fragments (<>A</a>,<React.Fragment>B</React.Fragment>,<RenamedFragment>B</RenamedFragment>) would not havenoUselessFragmentsemitted for them.On the Biome side, instances such as these would emit
noUselessFragments, and applying the suggested fix would turn the text content into a proper JS string.// Ended up as: - const t = "Text" const t = <>Text</> // Ended up as: - const e = t ? "Option A" : "Option B" const e = t ? <>Option A</> : <>Option B</> /* Ended up as: function someFunc() { return "Content desired to be a multi-line block of text." } */ function someFunc() { return <> Content desired to be a multi-line block of text. <> }The proposed update was to align Biome's reaction to this rule with ESLint's; the aforementioned examples will now be supported from Biome's perspective, thus valid use of fragments.
// These instances are now valid and won't be called out by noUselessFragments. const t = <>Text</> const e = t ? <>Option A</> : <>Option B</> function someFunc() { return <> Content desired to be a multi-line block of text. <> }Fixed #6893: The
useExhaustiveDependenciesrule now correctly adds a dependency that is captured in a shorthand object member. For example:useEffect(() => { console.log({ firstId, secondId }); }, []);is now correctly fixed to:
useEffect(() => { console.log({ firstId, secondId }); }, [firstId, secondId]);Added a new lint rule
noReactForwardRef, which detects usages offorwardRefthat is no longer needed and deprecated in React 19.For example:
export const Component = forwardRef(function Component(props, ref) { return <div ref={ref} />; });will be fixed to:
export const Component = function Component({ ref, ...props }) { return <div ref={ref} />; };Note that the rule provides an unsafe fix, which may break the code. Don't forget to review the code after applying the fix.
Added new nursery rule
noDeprecatedImportsto flag imports of deprecated symbols.
Invalid example
// foo.js
import { oldUtility } from "./utils.js";// utils.js
/**
* @deprecated
*/
export function oldUtility() {}Valid examples
// foo.js
import { newUtility, oldUtility } from "./utils.js";// utils.js
export function newUtility() {}
// @deprecated (this is not a JSDoc comment)
export function oldUtility() {}Added
styleandrequireForObjectLiteraloptions to the lint ruleuseConsistentArrowReturn.This rule enforces a consistent return style for arrow functions. It can be configured with the following options:
style: (default:asNeeded)always: enforces that arrow functions always have a block body.never: enforces that arrow functions never have a block body, when possible.asNeeded: enforces that arrow functions have a block body only when necessary (e.g. for object literals).
style: "always"
Invalid:
const f = () => 1;
Valid:
const f = () => {
return 1;
};style: "never"
Invalid:
const f = () => {
return 1;
};Valid:
const f = () => 1;
style: "asNeeded"
Invalid:
const f = () => {
return 1;
};Valid:
const f = () => 1;
style: "asNeeded" and requireForObjectLiteral: true
Valid:
const f = () => {
return { a: 1 };
};Implements #7339. GritQL patterns can now use native Biome AST nodes using their
PascalCasenames, in addition to the existing TreeSitter-compatiblesnake_casenames.engine biome(1.0) language js(typescript,jsx) or { // TreeSitter-compatible pattern if_statement(), // Native Biome AST node pattern JsIfStatement() } as $stmt where { register_diagnostic( span=$stmt, message="Found an if statement" ) }Fixed 7574. The diagnostic message for the rule
useSolidForComponentnow correctly emphasizes<For />and provides a working hyperlink to the Solid documentation.Fixed #7320: The
useConsistentCurlyBracesrule now correctly detects a string literal including"inside a JSX attribute value.Added extra references to external rules to improve migration for the following rules:
noUselessFragments&noNestedComponentDefinitionsFixed an issue where
package.jsonmanifests would not be correctly discovered
when evaluating files in the same directory.The resolver can now correctly resolve
.ts,.tsx,.d.ts,.jsfiles by.jsextension if exists, based on the file extension substitution in TypeScript.For example, the linter can now detect the floating promise in the following situation, if you have enabled the
noFloatingPromisesrule.foo.tsexport async function doSomething(): Promise<void> {}bar.tsimport { doSomething } from "./foo.js"; // doesn't exist actually, but it is resolved to `foo.ts` doSomething(); // floating promise!Added the rule
noVueDuplicateKeys, which prevents duplicate keys in Vue component definitions.This rule prevents the use of duplicate keys across different Vue component options such as
props,data,computed,methods, andsetup. Even if keys don't conflict in the script tag, they may cause issues in the template since Vue allows direct access to these keys.
Invalid examples
<script>
export default {
props: ["foo"],
data() {
return {
foo: "bar",
};
},
};
</script><script>
export default {
data() {
return {
message: "hello",
};
},
methods: {
message() {
console.log("duplicate key");
},
},
};
</script><script>
export default {
computed: {
count() {
return this.value * 2;
},
},
methods: {
count() {
this.value++;
},
},
};
</script>Valid examples
<script>
export default {
props: ["foo"],
data() {
return {
bar: "baz",
};
},
methods: {
handleClick() {
console.log("unique key");
},
},
};
</script><script>
export default {
computed: {
displayMessage() {
return this.message.toUpperCase();
},
},
methods: {
clearMessage() {
this.message = "";
},
},
};
</script>Internal data for Unicode strings have been updated to Unicode 17.0.
Fixed #7256: The
useConsistentCurlyBracesrule now correctly ignores a string literal with braces that contains only whitespaces. Previously, literals that contains single whitespace were only allowed.The
useImportExtensionsrule now correctly detects imports with an invalid extension. For example, importing.tsfile with.jsextension is flagged by default. If you are using TypeScript with neither theallowImportingTsExtensionsoption nor therewriteRelativeImportExtensionsoption, it's recommended to turn on theforceJsExtensionsoption of the rule.Fixed #7470: solved a false positive for
noDuplicateProperties. Previously, declarations in@containerand@starting-styleat-rules were incorrectly flagged as duplicates of identical declarations at the root selector.For example, the linter no longer flags the
displaydeclaration in@containeror theopacitydeclaration in@starting-style.a { display: block; @container (min-width: 600px) { display: none; } } [popover]:popover-open { opacity: 1; @starting-style { opacity: 0; } }Fixed #7517: the
useOptionalChainrule no longer suggests changes for typeof checks on global objects.// ok typeof window !== "undefined" && window.location;
Fixed a bug where the suppression action for
noPositiveTabindexdidn't place the suppression comment in the correct position.Added nursery rule
noUnusedExpressionsto flag expressions used as a statement that is neither an assignment nor a function call.
Invalid examples
f; // intended to call `f()` instead
function foo() {
0; // intended to `return 0` instead
}Valid examples
f();
function foo() {
return 0;
}Fixed #6617: improved
useIterableCallbackReturnto correctly handle arrow functions with a single-expressionvoidbody.Now the following code doesn't trigger the rule anymore:
[].forEach(() => void null);
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.