Packages

@biomejs/biome

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

Your version

2.4.0

15 Feb 2026Where it was published

2.6.9 is the newest release of 2.x.

In short

1 deprecated49 new25 fixed28 internal

  • Deprecated

    useDeprecatedDate. The rule enforces use of GraphQL @deprecated directive with date. The default rule severity is set to warn.

Release note

Minor Changes

  • Added ignore option to the useHookAtTopLevel rule.

    You can now specify function names that should not be treated as hooks, even if they follow the use* naming convention.

    Example configuration:

    {
      "linter": {
        "rules": {
          "correctness": {
            "useHookAtTopLevel": {
              "options": {
                "ignore": ["useDebounce", "useCustomUtility"]
              }
            }
          }
        }
      }
    }
  • Added the rule useAnchorContent for HTML to enforce that anchor elements have accessible content for screen readers. The rule flags empty anchors, anchors with only whitespace, and anchors where all content is hidden with aria-hidden. Anchors with aria-label or title attributes providing a non-empty accessible name are considered valid.

  • Added the rule useMediaCaption to the HTML language. Enforces that audio and video elements have a track element with kind="captions" for accessibility. Muted videos are allowed without captions.

  • Added support for multiple reporters, and the ability to save reporters on arbitrary files.

Combine two reporters in CI

If you run Biome on GitHub, take advantage of the reporter and still see the errors in console, you can now use both reporters:

biome ci --reporter=default --reporter=github

Save reporter output to a file

With the new --reporter-file CLI option, it's now possible to save the output of all reporters to a file. The file is a path,
so you can pass a relative or an absolute path:

biome ci --reporter=rdjson --reporter-file=/etc/tmp/report.json
biome ci --reporter=summary --reporter-file=./reports/file.txt

You can combine these two features. For example, have the default reporter written on terminal, and the rdjson reporter written on file:

biome ci --reporter=default --reporter=rdjson --reporter-file=/etc/tmp/report.json

The --reporter and --reporter-file flags must appear next to each other, otherwise an error is thrown.

  • The Biome CSS parser is now able to parse Vue SFC syntax such as :slotted and :deep. These pseudo functions are only correctly parsed when the CSS is defined inside .vue components. Otherwise, Biome will a emit a parse error.

    This capability is only available when experimentalFullHtmlSupportedEnabled is set to true.

  • Added support for Cursor files. When Biome sees a Cursor JSON file, it will parse it with comments enabled and trailing commas enabled:

    • $PROJECT/.cursor/

    • %APPDATA%\Cursor\User\ on Windows

    • ~/Library/Application Support/Cursor/User/ on macOS

    • ~/.config/Cursor/User/ on Linux

  • Added JSON as a target language for GritQL pattern matching. You can now write Grit plugins for JSON files.

    This enables users to write GritQL patterns that match against JSON files, useful for:

    • Searching and transforming JSON configuration files

    • Enforcing patterns in package.json and other JSON configs

    • Writing custom lint rules for JSON using GritQL

    Example patterns:

    Match all key-value pairs:

    language json
    
    pair(key = $k, value = $v)

    Match objects with specific structure:

    language json
    
    JsonObjectValue()

    Supports both native Biome AST names (JsonMember, JsonObjectValue) and TreeSitter-compatible names (pair, object, array) for compatibility with existing Grit patterns.

    For more details, see the GritQL documentation.

  • Added ignore option to noUnknownProperty. If an unknown property name matches any of the items provided in ignore, a diagnostic won't be emitted.

  • Add a new reporter --reporter=sarif, that emits diagnostics using the SARIF format.

  • Added the useIframeTitle lint rule for HTML. The rule enforces the usage of the title attribute for the iframe element.

    Invalid:

    <iframe></iframe> <iframe title=""></iframe>

    Valid:

    <iframe title="title"></iframe>
  • Added a new assist action useSortedInterfaceMembers that sorts TypeScript interface members, for readability.

    It includes an autofix.

    Invalid example.

    interface MixedMembers {
      z: string;
      a: number;
      (): void;
      y: boolean;
    }

    Valid example (after using the assist).

    interface MixedMembers {
      a: number;
      y: boolean;
      z: string;
      (): void;
    }
  • It's now possible to provide the stacktrace for a fatal error. The stacktrace is only available when the environment variable RUST_BACKTRACE=1 is set, either via the CLI or exported $PATH. This is useful when providing detailed information for debugging purposes:

    RUST_BACKTRACE=1 biome lint
  • The Biome Language Server now reports progress while scanning files and dependencies in the project.

  • Fixed #8024. The rule useIterableCallbackReturn now supports a checkForEach option. When set to false, the rule will skip checking for forEach() callbacks for returning values.

  • Added the rule useValidLang to the HTML language.

  • Added support for jsxFactory and jsxFragmentFactory.Biome now respects jsxFactory and jsxFragmentFactory settings from tsconfig.json when using the classic JSX runtime, preventing false positive noUnusedImports errors for custom JSX libraries like Preact.

    // tsconfig.json
    {
      compilerOptions: {
        jsx: "react",
        jsxFactory: "h",
        jsxFragmentFactory: "Fragment",
      },
    }
    // Component.jsx
    import { h, Fragment } from "preact";
    
    function App() {
      return <div>Hello</div>;
    }
  • Added new CLI options to the commands lsp-proxy and start that allow to control the Biome file watcher.

--watcher-kind

Controls how the Biome file watcher should behave. By default, Biome chooses the best watcher strategy for the
current OS, however sometimes this could result in some issues, such as folders locked.

The option accepts the current values:

  • recommended: the default option, which chooses the best watcher for the current platform.

  • polling: uses the polling strategy.

  • none: it doesn't enable the watcher. When the watcher is disabled, changes to files aren't recorded anymore by Biome. This might have
    repercussions on some lint rules that might rely on updated types or updated paths.

The environment variable BIOME_WATCHER_KIND can be used as alias.

--watcher-polling-interval

The polling interval in milliseconds. This is only applicable when using the polling watcher. It defaults to 2000 milliseconds.

The environment variable BIOME_WATCHER_POLLING_INTERVAL can be used as alias.

  • Added the useHtmlLang lint rule for HTML. The rule enforces that the html element has a lang attribute.

    Invalid:

    <html></html>
    <html lang></html>
    <html lang=""></html>

    Valid:

    <html lang="en"></html>
  • Added support for formatting and linting embedded GraphQL snippets in JavaScript.

    For example, the following snippets are now formatted:

    import gql from "graphql-tag";
    
    const PeopleCountQuery = gql`
      query PeopleCount {
        allPeople {
          totalCount
        }
      }
    `;
    import { graphql } from "./graphql";
    
    const PeopleCountQuery = graphql(`
      query PeopleCount {
        allPeople {
          totalCount
        }
      }
    `);

    This feature is experimental and must be enabled explicitly in the configuration:

    {
      "javascript": {
        "experimentalEmbeddedSnippetsEnabled": true
      }
    }
  • Added groupByNesting option to the useSortedKeys assist. When enabled, object keys are grouped by their value's nesting depth before sorting alphabetically.

    Simple values (primitives, single-line arrays, and single-line objects) are sorted first, followed by nested values (multi-line arrays and multi-line objects).

Example

To enable this option, configure it in your biome.json:

{
  "linter": {
    "rules": {
      "source": {
        "useSortedKeys": {
          "options": {
            "groupByNesting": true
          }
        }
      }
    }
  }
}

With this option, the following unsorted object:

const object = {
  name: "Sample",
  details: {
    description: "nested",
  },
  id: 123,
};

Will be sorted as:

const object = {
  id: 123,
  name: "Sample",
  details: {
    description: "nested",
  },
};

Correctness

Promoted the following rules to the correctness group:

  • noUnresolvedImports. The rule reports imports that cannot be resolved.
    The default rule severity is set to error.

  • noVueReservedProps. The rule reports Vue reserved props usage.
    The default rule severity is set to error.

  • noVueReservedKeys. The rule reports Vue reserved keys usage.
    The default rule severity is set to error.

  • noVueDataObjectDeclaration. The rule reports Vue 2 data declared as an object instead of a function.
    The default rule severity is set to warn.

  • noNextAsyncClientComponent. The rule reports async Next.js client components.
    The default rule severity is set to warn.

  • noVueDuplicateKeys. The rule reports duplicate keys in Vue component options.
    The default rule severity is set to error.

  • noVueSetupPropsReactivityLoss. The rule reports destructuring of props in Vue 3 setup which causes reactivity loss.
    The default rule severity is set to error.

  • useQwikMethodUsage. The rule enforces correct Qwik framework method usage.
    The default rule severity is set to error.

  • useQwikValidLexicalScope. The rule enforces valid lexical scope in Qwik framework.
    The default rule severity is set to error.

Suspicious

Promoted the following rules to the suspicious group:

  • noImportCycles. The rule reports circular imports.
    The default rule severity is set to warn.

  • noDeprecatedImports. The rule reports imports of deprecated symbols.
    The default rule severity is set to warn.

  • noReactForwardRef. The rule reports usage of React.forwardRef.
    The default rule severity is set to warn.

  • noUnusedExpressions. The rule reports expressions that are never used.
    The default rule severity is set to warn.

  • noEmptySource. The rule reports empty source files.
    The default rule severity is set to warn.

  • Deprecated

    useDeprecatedDate. The rule enforces use of GraphQL @deprecated directive with date.
    The default rule severity is set to warn.

  • noDuplicateDependencies. The rule reports duplicate dependencies in package.json.
    The default rule severity is set to warn.

Complexity

Promoted the following rules to the complexity group:

  • noUselessUndefined. The rule reports useless undefined initialization and returns.
    The default rule severity is set to info.

  • useMaxParams. The rule enforces a maximum number of function parameters.
    The default rule severity is set to warn.

  • noUselessCatchBinding. The rule reports useless catch binding parameters.
    The default rule severity is set to info.

Style

Promoted the following rules to the style group:

  • useConsistentArrowReturn. The rule enforces consistent return in arrow functions.
    The default rule severity is set to info.

  • noJsxLiterals. The rule reports literal strings in JSX.
    The default rule severity is set to info.

  • Added support for the top-level suppression comment biome-ignore-all format: <explanation>.

    When the comment biome-ignore-all format: <explanation> is placed at the beginning of the document, Biome won't format the code.

    The feature works for all supported languages. In the following JavaScript snippet, the code isn't formatted and will stay as is.

    // biome-ignore-all format: generated
    
    const a = [];
    
    const a = [];
    
    const a = [];
  • Added support for the typed attr function. Addresses issue #6183.

    Example

    .btn {
      width: attr(data-size type(<length> | <percentage>), 0px);
    }
  • Added the noAccessKey lint rule for HTML. The rule enforces that the accesskey attribute is not used on any HTML element, as it can conflict with keyboard commands used by screen readers and keyboard-only users.

    Invalid:

    <input type="submit" accesskey="s" value="Submit" />
    <a href="https://webaim.org/" accesskey="w">WebAIM.org</a>
    <button accesskey="n">Next</button>

    Valid:

    <input type="submit" value="Submit" />
    <a href="https://webaim.org/">WebAIM.org</a>
    <button>Next</button>
  • Added a feature that allows editors to inject a Biome configuration to the Biome Language Server without affecting the configuration of the project.

    If you have a Biome extension that is compatible with your preferred LSP-ready editor, you can map inlineConfig. The configuration will be merged with the configuration of the project (or the default configuration):

    For example, with the Zed editor, you would have the following configuration, which will format all files using four spaces as indentation style:

    // .zed/settings.json
    {
      lsp: {
        biome: {
          settings: {
            inline_config: {
              formatter: {
                indentStyle: "space",
                indentWidth: 4,
              },
            },
          },
        },
      },
    }
  • Added 2 options from typescript-eslint (ignoreDifferentlyNamedParameters and ignoreDifferentJsDoc) to useUnifiedTypeSignatures.

    Each option makes the rule ignore overload signatures whose parameter names or JSDoc comments differ.

Examples

Valid code with ignoreDifferentlyNamedParameters set to true:

function cook(scoops: IceCreamScoop[]): void;
function cook(cakeType: string): void;

Valid code with ignoreDifferentJsDoc set to true:

/** Does objs have "cow" inside it? */
function hasCow(objs: string[]): boolean;
/** @deprecated - convert to array */
function hasCow(objs: string): boolean;

Patch Changes

  • Added e18e ESLint plugin as a recognized rule source. Six Biome rules now reference their e18e equivalents: useAtIndex, useExponentiationOperator, noPrototypeBuiltins, useDateNow, useSpread, and useObjectSpread.

  • Added proper parsing and formatting for Svelte directives when the html.experimentalFullSupportEnabled is set to true.

  • Revamped the logging options for all Biome commands. Now the commands format, lint, check, ci, search, lsp-proxy and start accept the following CLI options.

    Some options might have been present before, but they were inconsistent. Plus, all new options have an environment variable as aliases.

--log-file

Optional path/file to redirect log messages to. This option is applicable only to the CLI. If omitted, logs are printed to stdout.

Environment variable alias: BIOME_LOG_FILE

--log-prefix-name

Allows changing the prefix applied to the file name of the logs. This option is applicable only to the daemon.

Environment variable alias: BIOME_LOG_PREFIX_NAME

--log-path

Allows changing the folder where logs are stored. This option is applicable only to the daemon.

Environment variable alias: BIOME_LOG_PATH

--log-level

The level of logging. In order, from the most verbose to the least verbose: debug, info, warn, error

The value none won't show any logging.

Environment variable alias: BIOME_LOG_LEVEL

--log-kind

What the log should look like.

Environment variable alias: BIOME_LOG_KIND

Reduce dumping of LSP logs

When you use a Biome editor extension, Biome's Daemon dumps its logs using the debug level. If you want to reduce
the quantity of these logs, you can now customize it:

BIOME_LOG_LEVEL=info biome lsp-proxy
  • Fixed #901. Biome now allows trailing commas in inside Zed settings.json and VSCode settings.json.

  • Fixed #8628: useComponentExportOnlyModules now allows components referenced as object property values in exported expressions. This fixes false positives for TanStack Router patterns.

    export const Route = createFileRoute('/')({
      component: HomeComponent,
    })
    
    function HomeComponent() { ... } // no longer reported as "should be exported"
  • Fixed #9057: Incorrect diagnostic spans for suppression comments and other raw diagnostics in HTML-ish files (Vue, Svelte, Astro). Previously, diagnostics like "unused suppression" pointed to the wrong location in the document due to the diagnostic offset not being applied.

  • Fixed #9024: Biome no longer reports <hr role="presentation"> under noInteractiveElementToNoninteractiveRole.

  • Fixed #9068: The noVueDuplicateKeys rule now correctly handles toRefs(props) patterns and no longer produces false positives when destructuring props, particularly in <script setup> blocks.

  • Fixed #7138. Now the Biome language server correctly handles the configurationPath setting coming from the editor extension.

  • Fixed the noSvgWithoutTitle rule not to recursively traverse title elements.

  • Added proper parsing for spread attributes {...props} in Svelte and Astro files.

  • Fixed #4927, #6407: The HTML formatter will now correctly break a block-like element if it has more than 2 children, and at least one of them is another block-like element.

    -<div>a<div>b</div> c</div>
    +<div>
    +  a
    +  <div>b</div>
    +  c
    +</div>
  • Fixed #7912, where Biome incorrectly added a leading newline to the code contained inside the Astro frontmatter.

  • Major Breaking Changes to the HTML formatter only

    The HTML formatter (which is still experimental) has been completely overhauled from the ground up to more closely resemble Prettier's formatting. If you have opted in to the HTML formatter, you may see large formatting diffs for your HTML, Vue, Svelte, and Astro files.

    This overhaul fixes several issues (#5150, #6625, #8437) around whitespace sensitivity that were causing incorrect formatting in certain scenarios that were difficult or impossible to fully address before.

  • Improved the rules useConst, noUnusedImports, useImportTypes and noUnusedVariables inside
    Vue, Svelte and Astro files when experimentalFullSupportEnabled is set to true.

    Now variables and components that are imported or defined inside the files won't trigger false positives.

    Until now, we suggested disabling these rules with an override. Now the rules are more stable; however, you might still experience
    a few false positives. Those are probably issues caused by our parser.

    If you use experimentalFullSupportEnabled, you can remove the following override:

    {
    -  "overrides": [
    -    {
    -      "includes": ["**/*.svelte", "**/*.astro", "**/*.vue"],
    -      "linter": {
    -        "rules": {
    -          "style": {
    -            "useConst": "off",
    -            "useImportType": "off"
    -          },
    -          "correctness": {
    -            "noUnusedVariables": "off",
    -            "noUnusedImports": "off"
    -          }
    -        }
    -      }
    -    }
    -  ]
    }
  • Fixed an issue where some info diagnostics weren't tracked by the final summary.

  • Fixed #8692: Biome now accepts Vue's v-bind() function in CSS when Vue CSS modules parsing is enabled.

  • Fixed plugin diagnostics showing incorrect line numbers in Vue, Astro, and Svelte files. Plugin diagnostics now correctly account for the template/frontmatter offset, pointing to the right location in the <script> block.

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.