Dev News Daily ENDE

Biome 2.6.6 adds a batch of nursery lint rules and fixes rule groups over 256 entries

The formatter and linter Biome has released version 2.6.6 on 6 November. Most of the release is new rules in its nursery group, and most of those were contributed by the GitHub user dyc3.

Several rules catch code that will throw or never behave as written. noArrayMethodsOnArguments reports calls such as reduce on the arguments object, which is not an array and fails with a TypeError. noNumberArgumentOutOfRange flags literal arguments to toFixed, toString, toExponential and toPrecision that the method rejects with a RangeError. noUninvokedArrayCallback catches map or forEach on an array of empty slots, where the callback never runs. noConstantComparisons reports && and || conditions that are always true, never true or contain a check with no effect, and noErasingOperation flags multiplying or bitwise AND with zero.

Others target style and framework use: noNegatedArrayPredicate suggests moving a negation into the callback of some or every, noSharedBranchCode reports code repeated at the start or end of every branch of an if, noSvelteIgnoredUnsubscribe catches store subscriptions that can never be stopped, and a Next.js rule steers Google Analytics and Tag Manager scripts to the components in @next/third-parties. Two rules check package.json for missing cpu and engines fields.

The fixes include a bug where configuring a group of more than 256 rules could switch the wrong rule on or off, faster linting that skips syntax nodes no enabled rule inspects, fewer memory allocations in CSS selector rules, and correct parsing of negative interpolation in SCSS lists.

Biome 2.6.6 adds a batch of nursery lint rules and fixes rule groups over 256 entries
Biome 2.6.6 adds a batch of nursery lint rules and fixes rule groups over 256 entries — Dev News Daily

What it means

The rule-group fix is the one to note for large configurations, since it could silently change which checks ran. The new rules sit in the nursery group, so projects can try them before relying on them.