Packages

@biomejs/biome

2.6.8 · 15 Nov 2026MIT OR Apache-2.030.3M / weekRepositoryHomepagenpmAtom feed

Your version

2.4.12

14 Apr 2026Where it was published

2.6.9 is the newest release of 2.x.

In short

11 new27 fixed

Release note

Patch Changes

  • Added the nursery/noIdenticalTestTitle lint rule. This rule disallows using the same title for two describe blocks or two test cases at the same nesting level.

    describe("foo", () => {});
    describe("foo", () => {
      // invalid: same title as previous describe block
      test("baz", () => {});
      test("baz", () => {}); // invalid: same title as previous test case
    });
  • Improved the diagnostics for useForOf to better explain the problem, why it matters, and how to fix it.

  • Added a new nursery rule noComponentHookFactories, that disallows defining React components or custom hooks inside other functions.

    For example, the following snippets trigger the rule:

    function createComponent(label) {
      function MyComponent() {
        return <div>{label}</div>;
      }
      return MyComponent;
    }
    function Parent() {
      function Child() {
        return <div />;
      }
      return <Child />;
    }
  • Fixed #9941: Biome now emits a warning diagnostic when a file exceed the files.maxSize limit.

  • Fixed #9918: useConsistentTestIt no longer panics when applying fixes to chained calls such as test.for()("x", () => {});.

  • Improved the noGlobalObjectCalls diagnostic to better explain why calling global objects like Math or JSON is invalid and how to fix it.

  • Fixed #9901: the command lint --write is now idempotent when it's run against HTML-ish files that contains scripts and styles.

  • Improved the noMultiStr diagnostic to explain why escaped multiline strings are discouraged and what to use instead.

  • Fixed #9113: Biome now parses and formats @media and other conditional blocks correctly inside embedded CSS snippets.

  • The noFloatingPromises rule now detects floating promises through cross-module generic wrapper functions. Previously, patterns like export const fn = trace(asyncFn) — where trace preserves the function signature via a generic <F>(fn: F): F — were invisible to the rule when the wrapper was defined in a different file.

  • Fixed #9975: Biome now parses nested CSS selectors correctly inside embedded snippets without requiring an explicit &.

  • Added the nursery rule useIframeSandbox, which enforces the sandbox attribute for iframe tags.

    Invalid:

    <iframe></iframe>
  • Added the nursery rule noJsxNamespace, which disallows JSX namespace syntax.

    Invalid:

    <ns:testcomponent />
  • Improved the noSelfCompare diagnostic to better explain why comparing a value to itself is suspicious and what to use for NaN checks.

  • Added the new nursery rule useVarsOnTop, which requires var declarations to appear at the top of their containing scope.

    For example, the following code now triggers the rule:

    function f() {
      doSomething();
      var value = 1;
    }
  • Improved the noThenProperty diagnostic to better explain why exposing then can create thenable behavior and how to avoid it.

  • Improved the noShorthandPropertyOverrides diagnostic to explain why later shorthand declarations can unintentionally overwrite earlier longhand properties.

  • Fixed #9744: useExhaustiveDependencies no longer reports false positives for variables obtained via object destructuring with computed keys, e.g. const { [KEY]: key1 } = props.

  • Improved the noRootType diagnostic to better explain that the reported root type is disallowed by project configuration and how to proceed.

  • Added eslint-plugin-unicorn's no-nested-ternary as a rule source for noNestedTernary

  • noMisleadingReturnType now checks class methods, object methods, and getters in addition to functions.

  • Updated metadata for biome migrate eslint to better reflect which ESLint rules are redundant versus unsupported versus unimplemented.

  • Improved the noAutofocus diagnostic to better explain why autofocus harms accessibility outside allowed modal contexts.

  • Improved performance of noMagicNumbers.
    Biome now maps ESLint no-magic-numbers sources more accurately during biome migrate eslint.

  • Improved the diagnostics for noConstantCondition to better explain the problem, why it matters, and how to fix it.

  • Added a new nursery rule noExcessiveSelectorClasses, which limits how many class selectors can appear in a single CSS selector.

  • Added a new nursery rule useStringStartsEndsWith, which prefers startsWith() and endsWith() over verbose string prefix and suffix checks.

    The rule uses type information, so it only reports on strings and skips array lookups such as items[0] === "a".

  • Fixed the safe fix for noSkippedTests so it no longer panics when rewriting skipped test function names such as xit(), xtest(), and xdescribe().

  • Type-aware lint rules now resolve members through Pick<T, K> and Omit<T, K> utility types.

  • Added the nursery rule useReactAsyncServerFunction, which requires React server actions to be async.

    Invalid:

    function serverFunction() {
      "use server";
      // ...
    }
  • Fixed #9910: added support for parsing member expressions in Svelte directive properties. Biome now correctly parses directives like in:renderer.in|global, use:obj.action, and deeply nested forms like in:a.b.c|global.

  • Fixed #9626: noUnresolvedImports no longer reports false positives for named imports from packages that have a corresponding @types/* package installed. For example, import { useState } from "react" with @types/react installed is now correctly recognised.

  • Fixed the safe fix for noFocusedTests so it no longer panics when rewriting focused test function names such as fit() and fdescribe().

  • Added the nursery rule useReduceTypeParameter. It flags type assertions on the initial value passed to Array#reduce and Array#reduceRight and recommends using a type parameter instead.

    // before: type assertion on initial value
    arr.reduce((sum, num) => sum + num, [] as number[]);
    
    // after: type parameter on the call
    arr.reduce<number[]>((sum, num) => sum + num, []);
  • Added extra rule sources from react-xyz. biome migrate eslint should do a bit better detecting rules in your eslint configurations.

  • Improved the noInvalidUseBeforeDeclaration diagnostic to better explain why using a declaration too early is problematic and how to fix it.

  • Improved the diagnostics for noRedeclare to better explain the problem, why it matters, and how to fix it.

  • Type-aware lint rules now resolve members through Partial<T>, Required<T>, and Readonly<T> utility types, preserving optional, readonly, and nullable member flags.

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.