github biomejs/biome cli/v1.2.0
CLI v1.2.0

12 months ago

CLI

New features

  • Add new options to customize the behaviour the formatter based on the language of the file
    • --json-formatter-enabled
    • --json-formatter-indent-style
    • --json-formatter-indent-size
    • --json-formatter-line-width
    • --javascript-formatter-enabled
    • --javascript-formatter-indent-style
    • --javascript-formatter-indent-size
    • --javascript-formatter-line-width

Bug fixes

  • Fix a bug where --errors-on-warning didn't work when running biome ci command.

Configuration

New features

  • Add new options to customize the behaviour of the formatter based on the language of the file
    • json.formatter.enabled
    • json.formatter.indentStyle
    • json.formatter.indentSize
    • json.formatter.lineWidth
    • javascript.formatter.enabled
    • javascript.formatter.indentStyle
    • javascript.formatter.indentSize
    • javascript.formatter.lineWidth

Linter

Promoted rules

New rules are incubated in the nursery group.
Once stable, we promote them to a stable group.
The following rules are promoted:

New rules

Removed rules

  • Remove noConfusingArrow.

    Code formatters, such as prettier and Biome, always adds parentheses around the parameter or the body of an arrow function.
    This makes the rule useless.

    Contributed by @Conaclos

Enhancements

  • noFallthroughSwitchClause now relies on control flow analysis to report most of switch clause fallthrough. Contributed by @Conaclos

  • noAssignInExpressions no longer suggests code fixes. Most of the time the suggestion didn't match users' expectations. Contributed by @Conaclos

  • noUselessConstructor no longer emits safe code fixes. Contributed by @Conaclos

    All code fixes are now emitted as unsafe code fixes.
    Removing a constructor can change the behavior of a program.

  • useCollapsedElseIf now only provides safe code fixes. Contributed by @Conaclos

  • noUnusedVariables now reports more cases.

    The rule is now able to ignore self-writes.
    For example, the rule reports the following unused variable:

    let a = 0;
    a++;
    a += 1;

    The rule is also capable of detecting an unused declaration that uses itself.
    For example, the rule reports the following unused interface:

    interface I {
      instance(): I
    }

    Finally, the rule now ignores all TypeScript declaration files,
    including global declaration files.

    Contributed by @Conaclos

Bug fixes

VSCode

Enhancements

  • Improve server binary resolution when using certain package managers, notably pnpm.

    The new strategy is to point to node_modules/.bin/biome path,
    which is consistent for all package managers.

    Contributed by @nhedger

What's Changed

New Contributors

Full Changelog: cli/v1.1.2...cli/v1.2.0

Don't miss a new biome release

NewReleases is sending notifications on new releases.