github biomejs/biome cli/v1.6.4-nightly.a995ada
CLI v1.6.4-nightly.a995ada

Analyzer

Bug fixes

  • Now Biome can detect the script language in Svelte and Vue script blocks more reliably (#2245). Contributed by @Sec-ant

CLI

Bug fixes

  • Biome now tags the diagnostics emitted by organizeImports and formatter with correct severity levels, so they will be properly filtered by the flag --diagnositic-level (#2288). Contributed by @Sec-ant
  • Biome now correctly filters out files that are not present in the current directory when using the --changed flag #1996.

New features

  • Add a command to migrate from ESLint

    @biomejs/biome migrate eslint allows you to migrate an ESLint configuration to Biome.
    The command supports legacy ESLint configurations and new flat ESLint configurations.
    Legacy ESLint configurations using the YAML format are not supported.

    When loading a legacy ESLint configuration, Biome resolves the extends field.
    It resolves both shared configurations and plugin presets!
    To do this, it invokes NodeJS.

    Biome relies on the metadata of its rules to determine the equivalent rule of an ESLint rule.
    A Biome rule is either inspired or roughly identical to an ESLint rules.
    By default, inspired and nursery rules are excluded from the migration.
    You can use the CLI flags --include-inspired and --include-nursery to migrate them as well.

    Note that this is a best-effort approach.
    You are not guaranteed to get the same behavior as ESLint.

    Given the following ESLint configuration:

    {
          "ignore_patterns": ["**/*.test.js"],
          "globals": { "var2": "readonly" },
          "rules": {
              "eqeqeq": "error"
          },
          "overrides": [{
              "files": ["lib/*.js"],
              "rules": {
                "default-param-last": "off"
              }
          }]
    }

    @biomejs/biome migrate eslint --write changes the Biome configuration as follows:

    {
      "linter": {
        "rules": {
          "recommended": false,
          "suspicious": {
            "noDoubleEquals": "error"
          }
        }
      },
      "javascript": { "globals": ["var2"] },
      "overrides": [{
        "include": ["lib/*.js"],
        "linter": {
          "rules": {
            "style": {
              "useDefaultParameterLast": "off"
            }
          }
        }
      }]
    }

    Also, if the working diretcory contains .eslintignore, then Biome migrates the glob patterns.
    Nested .eslintignore in subdirectories and negated glob patterns are not supported.

    If you find any issue, please don't hesitate to report them.

    Contributed by @Conaclos

Enhancements

  • Improve support of .prettierignore when migrating from Prettier

    Now, Biome translates most of the glob patterns in .prettierignore to the equivalent Biome ignore pattern.
    Only negated glob patterns are not supported.

    Contributed by @Conaclos

Configuration

Enhancements

  • Biome now displays the location of a parsing error for its configuration file (#1627).

    Previously, when Biome encountered a parsing error in its configuration file,
    it didn't indicate the location of the error.
    It now displays the name of the configuration file and the range where the error occurred.

    Contributed by @Conaclos

Editors

Formatter

JavaScript APIs

Linter

New features

  • Add a new option ignoreReact to noUnusedImports.

    When ignoreReact is enabled, Biome ignores imports of React from the react package.
    The option is disabled by default.

    Contributed by @Conaclos

  • Implement #2043: The React rule useExhaustiveDependencies is now also compatible with Preact hooks imported from preact/hooks or preact/compat. Contributed by @arendjr

Enhancements

Bug fixes

  • Lint rules useNodejsImportProtocol, useNodeAssertStrict, noRestrictedImports, noNodejsModules will no longer check declare module statements anymore. Contributed by @Sec-ant

Parser

What's Changed

Other changes

New Contributors

Full Changelog: cli/v1.6.4...cli/v1.6.4-nightly.a995ada

Don't miss a new biome release

NewReleases is sending notifications on new releases.