Skip to content

Releases: biomejs/biome

Biome CLI v2.0.5

23 Jun 12:55
09f49ba

Choose a tag to compare

2.0.5

Patch Changes

  • #6461 38862e6 Thanks @ematipico! - Fixed #6419, a regression where stdin mode would create a temporary new file instead of using the one provided by the user. This was an intended regression.

    Now Biome will use the file path passed via --std-file-path, and apply the configuration that matches it.

  • #6480 050047f Thanks @Conaclos! - Fixed #6371.
    useNamingConvention now checks the string case of objects' property shorthand.

  • #6477 b98379d Thanks @ematipico! - Fixed an issue where Biome formatter didn't format consistently CSS value separated by commas.

    .font-heading {
    - font-feature-settings: var(--heading-salt), var(--heading-ss06),
    -   var(--heading-ss11), var(--heading-cv09), var(--heading-liga),
    -   var(--heading-calt);
    
    +  font-feature-settings:
    +    var(--heading-salt), var(--heading-ss06), var(--heading-ss11),
    +    var(--heading-cv09), var(--heading-liga), var(--heading-calt);
    }
    
  • #6248 ec7126c Thanks @fireairforce! - Fixed grit pattern matching for different kinds of import statements.

    The grit pattern import $imports from "foo" will match the following code:

    import bar from "foo";
    import { bar } from "foo";
    import { bar, baz } from "foo";

What's Changed

Full Changelog: https://github.com/biomejs/biome/compare/@biomejs/[email protected]...@biomejs/[email protected]

@biomejs/[email protected]

21 Jun 09:02
4595a7c

Choose a tag to compare

2.0.4

Patch Changes

What's Changed

Full Changelog: https://github.com/biomejs/biome/compare/@biomejs/[email protected]...@biomejs/[email protected]

@biomejs/[email protected]

20 Jun 12:54

Choose a tag to compare

Warning

Biome v2.0.1 and v2.0.2 are currently broken, please use v2.0.0 in the meantime. See #6435 for details.

Patch Changes

  • #6425 00e97ad Thanks @siketyan! - Fixed #6391: the rule noUselessFragments no longer reports a fragment that contains whitespaces which aren't trimmed by the runtime.

  • #6417 dd88565 Thanks @ematipico! - Fixed #6360: The following pseudo classes and elements are no longer reported by noUnknownPseudoClass or noUnknownPseudoElement rules.

    • :open
    • ::details-content
    • ::prefix
    • ::search-text
    • ::suffix
  • #6417 dd88565 Thanks @ematipico! - Fixed #6357, where the boolean values weren't correctly merged when using the extends functionality. Now Biome correctly merges the values.

  • #6417 dd88565 Thanks @ematipico! - Fixed #6341: Fixed an issue where Biome would throw an error for the language tags nb and nn.

  • #6385 94142dd Thanks @siketyan! - Fixed #6377: The rule noSelfCompare now correctly compares two function calls with different arguments.

  • #6417 dd88565 Thanks @ematipico! - Fixed #6278: useExhaustiveDependencies no longer adds duplicated dependencies into the list.

  • #6417 dd88565 Thanks @ematipico! - Fix #6396, where vi.useFakeTimers() and vi.useRealTimers() incorrectly triggered React Hooks-related rules

  • #6417 dd88565 Thanks @ematipico! - Fixed a bug where Biome didn't correctly discover nested configuration files when using the lint command and the linter is disabled in the root configuration.

  • #6422 594ec50 Thanks @ematipico! - Removed the experimental rename feature from Biome LSP, which caused some issues inside existing editors such as Zed.

  • #6388 c6942d2 Thanks @siketyan! - Fixed #6375: the formatter no longer inserts an extra empty line before a semicolon when it has leading comments.

@biomejs/js-api v1.0.0

17 Jun 13:32

Choose a tag to compare

@biomejs/[email protected]

chore: cleanup CHANGELOG

Biome CLI v2.0.0

17 Jun 13:30

Choose a tag to compare

Major Changes

  • Biome now resolves globs and paths from the configuration. Before, paths and globs were resolved from the working directory.

  • Biome now raises a warning diagnostic for suppression comments that have <explanation> as reason.

    <explanation> is provided as a placeholder when applying the suppression code fix from LSP editors.

  • Removed the --config-path argument from the biome lsp-proxy and biome start commands.

    The option was overriding the configuration path for all workspaces opened in the Biome daemon, which led to a configuration mismatch problem when multiple projects are opened in some editors or IDEs.

    If you are using one of our official plugins for IDEs or editors, it is recommended to update it to the latest version of the plugin, or you will get unexpected behavior.

    If you are a developer of a plugin, please update your plugin to use the workspace/configuration response instead of using the --config-path argument. Biome's LSP will resolve a configuration in the workspace automatically, so it is recommended to keep it empty unless you are using a custom configuration path.

  • Downgraded some code fixes to unsafe which were previously safe.

    The following rules have now a unsafe fix:

    If you want to keep applying these fixes automatically, configure the rule fix as safe:

    {
      "linter": {
        "rules": {
          "correctness": {
            "noFlatMapIdentity": {
              "level": "error",
              "fix": "safe"
            },
            "noUnusedImports": {
              "level": "error",
              "fix": "safe"
            }
          }
        }
      }
    }
  • Previously the lint rules noControlCharactersInRegex and noMisleadingCharacterClass checked both regular expression literals like /regex/ and dynamically built regular expressions like new RegExp("regex").

    Checking dynamically built regular expressions has many limitations, edge cases, and complexities.
    In addition, other rules that lint regular expressions don't check dynamically built regular expressions.

    Rather than add support for other rules and have half-baked checking, we decided to remove support for dynamically built regular expressions.

    Now the lint rules noControlCharactersInRegex and noMisleadingCharacterClass only check literals of regular expressions.

  • The lint rule noRestrictedGlobals now supports customizing message for each global name.

    For example, the following configuration:

    {
      "options": {
        "deniedGlobals": {
          "$": "jQuery is not allowed. Use native DOM manipulation instead."
        }
      }
    }

    emits a diagnostic:

    index.js:1:13 lint/style/noRestrictedGlobals ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
    
      ⚠ Do not use the global variable $.
    
      > 1 │ console.log($)
          │             ^
        2 │
    
      ℹ jQuery is not allowed. Use native DOM manipulation instead.
    

    Breaking Change: The option deniedGlobals is now a record instead of an array. Run biome migrate to migrate the configuration automatically.

  • Removed include and ignore fields in favor of the new field includes.

    The Biome configuration file allows users to specify which files should be processed using glob patterns.
    Prior to Biome 2.0, this was done using the include and ignore fields.
    In Biome 2.0, include and ignore are removed and replaced by includes.
    You can run biome migrate to convert include and ignore into includes automatically.

    includes uses a different glob pattern format that fixes many issues and many other limitations that Biome users reported.

    includes accepts an array of glob patterns.
    A glob pattern starting with a ! is a negated pattern also called exception.
    This replaces ignore patterns and allows users to create chains of include and ignore patterns.
    Thus, it is now possible to include again a file previously ignored.
    This was not possible with include and ignore, because ignore has priority over include.

    The semantics of * and **/* have changed too.
    Before, with include and ignore, the glob * was interpreted as **/*.
    Now, with includes, the globs * and **/* are interpreted differently.
    The first pattern matches all files that are inside a folder.
    The second pattern recursively matches all files and sub-folders inside a folder.

    Let's take an example.
    Given the following file hierarchy of a project...

    ├── biome.json
    ├── src
    │   ├── file.js
    │   ├── file.ts
    │   ├── out.gen.js
    │   ├── file.test.js
    │   └── test
    │       └── special.test.js
    └── test ...
    

    ...we want:

    1. Ignore all files ending with .test.js, except special.test.ts.
    2. Ignore all files of the test directory.
      The test directory is located at the root of the project.
    3. Execute the linter on files in the src directory, that don't end with .gen.js.
      The src directory is located at the root of the project.
    4. Enable the noDefaultExport lint rule on files ending with .ts.

    Prior to Biome 2.0, the configuration might look like:

    {
      "files": {
        "ignore": ["*.test.js", "test"]
      },
      "linter": {
        "include": ["src/**"],
        "ignore": ["*.gen.js"],
        "enabled": true
      },
      "overrides": [
        {
          "include": ["*.ts"],
          "linter": { "rules": { "style": { "noDefaultExport": "on" } } }
        }
      ]
    }

    Unfortunately, the configuration doesn't quite fit what we want:

    1. There is no way to ignore files and unignore one of them.
      Thus, we ignore all files ending with .test.js, including special.test.ts.
    2. The configuration ignores all directories named test, including src/test.
    3. The linter is executed on all files of all directories named src

    All these issues and limitations are fixed with includes.
    Here the migrated configuration:

    {
      "files": {
        "includes": ["**", "!**/*.test.js", "**/special.test.ts", "!test"]
      },
      "linter": {
        "includes": ["src/**", "!**/*.gen.js"],
        "enabled": true
      },
      "overrides": [
        {
          "includes": ["**/*.ts"],
          "linter": { "rules": { "style": { "noDefaultExport": "on" } } }
        }
      ]
    }
    1. All files named special.test.ts are unignored because the pattern appear after the pattern that ignore files ending with .test.js.
    2. Only the test directory at the project's root is ignored because the pattern doesn't start with **/.
    3. The linter is executed on the src directory at the project's root only.

    Because includes pattern have a different pattern format than include and ignore we made some adjustments:

    • We added the pattern ** in files.includes to ensure that all files are included before ignoring some of them.
    • We added the prefix **/ for patterns that must match at any level of the file hierarchy.
  • noUndeclaredVariables no longer reports TypeScript types.

    In TypeScript projects, developers often use global declaration files to declare global types.
    Biome is currently unable to detect these global types.
    This creates many false positives for noUndeclaredVariables.

    TypeScript is better suited to perform this kind of check.
    As proof of this, TypeScript ESLint doesn't provide any rule that extends the no-undef ESLint rule.

    This is why Biome 1.9 introduced a new option checkTypes which, when it is set to false, ignores undeclared type references.
    The option was set to true by default.

    This option is now set to false by default.
    To get the previous behavior, you have to set checkTypes to true:

    {
      "linter": {
        "rules": {
          "correctness": {
            "noUndeclaredVariables": {
              "level": "on",
              "options": { "checkTypes": true }
            }
          }
        }
      }
    }
  • The rule noUnusedVariables no longer reports unused function parameters. Use noUnusedFunctionParameters.

  • Fixed #5564. noTypeOnlyImportAttributes now ignores files ending with the extension .ts when the type field of package.json is set to commonjs.

  • The Biome formatter no longer adds a trailing comma in .json files, even when json.formatter.trailingCommas is set to true.

  • Prettier 3.4 introduced a change in their normalization process of string literals: it no longer unescapes useless escape sequences.
    Biome now matches the new behavior of Prettier when formatting code.
    This affects the JSON and JavaScript formatters.

  • Reduced accepted values for formatter options:

    • The option --quote-style doesn't accept Single and Double anymore.
    • The option --quote-properties doesn't accept AsNeeded and Preserve anymore.
    • The option --semicolons doesn't accept AsNeeded and Always anymore.
    • The option --arrow-parenthesis doesn't accept AsNeeded and Always anymore.
    • The option --trailing-commas doesn't accept ES5, All and None anymore.
    • The option --attribute-position doesn't accept Single and Multiline anymore.
      ...
Read more

JavaScript APIs v0.8.0-beta.3

02 Jun 08:47

Choose a tag to compare

Pre-release

What's Changed

Other changes

New Contributors

Full Changelog: https://github.com/biomejs/biome/compare/@biomejs/[email protected]...@biomejs/[email protected]

CLI v2.0.0-beta.6

02 Jun 07:47

Choose a tag to compare

CLI v2.0.0-beta.6 Pre-release
Pre-release

What's Changed

Other changes

New Contributors

Full Changelog: https://github.com/biomejs/biome/compare/@biomejs/[email protected]...@biomejs/[email protected]

CLI v2.0.0-beta.5

19 May 16:16
b9922b6

Choose a tag to compare

CLI v2.0.0-beta.5 Pre-release
Pre-release

What's Changed

Other changes

  • fix(reporter): fixed paths are relative by @ematipico in #6015
  • feat(cli): support rule without group in --only and --skip by @Conaclos in #6004
  • fix(noDuplicateProperties): don't track @keyframes by @ematipico in #6024
  • refactor(migrate): handle assist actions in rule mover by @Conaclos in #6027
  • feat: added an option to files - maxSize see [#5295](https://github.c… by @vladimir-ivanov in #6010
  • fix(core): only trigger on ServiceDataNotification per scan by @arendjr in #6032
  • feat(yaml): parse implicit block mapping by @vohoanglong0107 in #6000
  • fix(analyzer): fix plugin diagnostic suppression + resolve double diagnostics by @arendjr in #6035
  • chore: remove log by @ematipico in #6041
  • fix(lint/noUselessEscapeInString): avoid false positive for \${ escape in template literals by @lucasweng in #6042
  • feat(lint): implement useAdjacentGetterSetter rule by @mdevils in #5964
  • chore: change version of useAdjacentGetterSetter by @mdevils in #6046
  • fix(lsp): scope workspace/configuration request to workspace folder by @nhedger in #6047
  • fix(lint/noUselessEscapeInString): flag useless escapes after skipping ${ in template literals by @lucasweng in #6044
  • fix(formatter): keep newline before semicolon in the previous statement by @siketyan in #6048
  • feat(yaml): allows omitting value in explicit mapping by @vohoanglong0107 in #6054
  • refactor(xtask): promote-rule to move-rule by @Conaclos in #6057
  • refactor(lint): move noFlatMapIdentity, useArrayLiterals, noWith by @Conaclos in #6059
  • refactor(lint): move useValidTypeof, noNamespaceImport, useNumericLiterals by @Conaclos in #6061
  • refactor(lint/useConst): recommend the rule by @Conaclos in #6062
  • refactor(lint): upgrade some unsafe fixes to safe fixes by @Conaclos in #6063
  • refactor(lint/noUselessContinue): move rule to complexity by @Conaclos in #6068
  • feat(lint): implement noNestedComponentDefinitions rule by @mdevils in #6053
  • chore(deps): update github-actions by @renovate in #6070
  • chore(deps): update dependency @changesets/cli to v2.29.4 by @renovate in #6069
  • fix(deps): update @biomejs packages by @renovate in #6071
  • chore(renovate): ignore rust in the github-actions group by @siketyan in #6073
  • fix(deps): update rust crate ascii_table to 4.0.7 by @renovate in #6072
  • chore(deps): update dependency dprint to v0.50.0 by @renovate in #6074
  • chore(deps): update dependency eslint to v9.27.0 by @renovate in #6075
  • fix(core/lsp): correctly compute ignored files by @ematipico in #6052
  • fix(linter): noFloatingPromises detects "maybe" Promises by @arendjr in #6080
  • chore: add test case for config extends in biome_cli by @arendjr in #6081

New Contributors

Full Changelog: https://github.com/biomejs/biome/compare/@biomejs/[email protected]...@biomejs/[email protected]

JavaScript APIs v0.8.0-beta.2

14 May 16:17
b67a138

Choose a tag to compare

Pre-release

What's Changed

Other changes

Full Changelog: https://github.com/biomejs/biome/compare/@biomejs/[email protected]...@biomejs/[email protected]

CLI v2.0.0-beta.4

14 May 10:26
4a5ef84

Choose a tag to compare

CLI v2.0.0-beta.4 Pre-release
Pre-release

What's Changed

Other changes

Full Changelog: https://github.com/biomejs/biome/compare/@biomejs/[email protected]...@biomejs/[email protected]