@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
12 new2 faster5 fixed11 internal
Release note
The section about @biomejs/biome of a note shared by several packages.
Patch Changes
Added the new nursery rule
noArrayMethodsOnArguments. It reports calls to array methods on theargumentsobject, which isn't an array, so these calls throw aTypeErrorwhen the code runs.function sum() { return arguments.reduce((total, value) => total + value, 0); }Added the nursery rule
noConstantComparisons, which reports&&and||conditions that can never be true, are always true, or contain a check with no effect.if (statusCode <= 400 && statusCode > 500) {}Added the nursery rule
noErasingOperation, which disallows operations with0that always result in zero: multiplying by0, a bitwise AND with0, and dividing0by a number. The other value in these operations has no effect on the result, which usually means the code has a mistake.const total = price * 0;
Added the nursery rule
noNegatedArrayPredicate, which reports negated calls toArray#some()andArray#every()and suggests moving the negation into the callback function.// Invalid: use `array.every((item) => !isUnicorn(item))` instead. const isMissing = !array.some((item) => isUnicorn(item));
Added the new nursery rule
noNumberArgumentOutOfRange, which reports number literal arguments oftoString(),toFixed(),toExponential()andtoPrecision()that are outside the range the method accepts. These calls throw aRangeErrorat runtime.value.toString(64);
Added the nursery rule
noSharedBranchCode, which reports code that is repeated at the start or end of every branch of anifstatement. That code runs no matter which branch is taken, so it can be moved before or after theifstatement.if (condition) { doSomething(); cleanup(); } else { doSomethingElse(); cleanup(); }Added the new nursery rule
noSubtractionComparison, which reports subtracting two values only to compare the difference with0, and suggests comparing the values directly.if (a - b > 0) {}Added the nursery rule
noSvelteIgnoredUnsubscribe, which reports calls to a store'ssubscribe()method when the returned function is ignored. Without that function, the subscription can never be stopped, which causes a memory leak.<script> import { count } from "./stores.js"; count.subscribe((value) => console.log(value)); </script>Added the new nursery rule
noUninvokedArrayCallback, which reports array methods such asmap()andforEach()called with a callback on an array that only has empty slots. The callback never runs in this case.const list = new Array(5).map(() => createElement());
Added the nursery rule
useNextScriptForGoogleAnalytics, which reports<script>elements that load Google Analytics or Google Tag Manager. Use theGoogleAnalyticsandGoogleTagManagercomponents from@next/third-parties/googleinstead, which load these scripts after the page becomes interactive.<script async src="https://www.googletagmanager.com/gtag/js?id=G-XYZ" />
The rule belongs to the
nextdomain.Added the new nursery rule
usePackageJsonCpu, which reportspackage.jsonfiles that have nocpufield. Thecpufield lists the processor types that the package supports.The following
package.jsonfile satisfies the rule:{ "name": "my-package", "version": "1.0.0", "cpu": ["x64", "arm64"] }Added the nursery rule
usePackageJsonEngines, which reportspackage.jsonfiles that have noenginesfield.A
package.jsonpasses the rule once it declares the field:{ "name": "my-package", "engines": { "node": ">=20" } }Fixed #12954, where configuring rules in groups with more than 256 rules could enable or disable the wrong rule.
Improved the performance of linting. Each lint pass now spends less time stepping over syntax nodes that no enabled rule looks at.
Improved the performance of CSS linting. Rules that compare selectors, such as
noDescendingSpecificityandnoDuplicateSelectors, now make fewer memory allocations.Fixed
useGenericFontNamesreportingfont-familyinside@font-palette-values. There,font-familynames the font families the palette applies to, so it doesn't take a generic family.@font-palette-values --palette { font-family: Bixa; override-colors: 0 red; }Fixed #12073:
useExhaustiveSwitchCasesnow reports non-exhaustive switches over values read fromfor...ofloops overArray.prototype.entries(),Map, andSet, and over properties of array elements indexed by anumbervariable.noMisusedPromisesnow also reports Promise-returning callbacks passed to array methods such asfindandevery.Fixed #12957: Biome now correctly parses SCSS negative interpolation list items as separate values instead of an invalid subtraction operator.
-margin: -#{$s} - #{$s} - #{$s} auto; +margin: -#{$s} -#{$s} -#{$s} auto;
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.