Skip to content

Releases: biomejs/biome

VSCode Extension v1.4.1

15 Sep 17:08
9aa5c4e
Compare
Choose a tag to compare

What's Changed

Full Changelog: cli/v1.2.0...lsp/v1.4.1

VSCode Extension v1.4.0

15 Sep 14:13
1897c24
Compare
Choose a tag to compare

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

Read more

CLI v1.2.1

15 Sep 17:08
9aa5c4e
Compare
Choose a tag to compare

Configuration

  • Fix an edge case where the formatter language configuration wasn't picked.
  • Fix the configuration schema, where json.formatter properties weren't transformed in camel case.

What's Changed

Other changes

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

CLI v1.2.0

15 Sep 14:13
1897c24
Compare
Choose a tag to compare

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

Read more

VSCode Extension v1.3.20230915

15 Sep 04:56
9c28238
Compare
Choose a tag to compare
Pre-release

Analyzer

CLI

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

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

Editors

Formatter

JavaScript APIs

Linter

New features

Enhancements

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

  • noAssignInExpressions no longer suggest 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

  • 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

Bug fixes

Parser

VSCode

What's Changed

Other changes

New Contributors

Read more

VSCode Extension v1.2.2

07 Sep 19:21
cde6581
Compare
Choose a tag to compare

Analyzer

CLI

Configuration

Editors

Formatter

JavaScript APIs

Linter

Parser

VSCode

What's Changed

Full Changelog: cli/v1.1.1...lsp/v1.2.2

VSCode Extension v1.2.1

07 Sep 09:56
a947fc9
Compare
Choose a tag to compare

Analyzer

CLI

Configuration

Editors

Formatter

JavaScript APIs

Linter

Parser

VSCode

What's Changed

New Contributors

Full Changelog: cli/v1.1.0...lsp/v1.2.1

CLI v1.1.2

07 Sep 19:22
cde6581
Compare
Choose a tag to compare

Editors

Bug fixes

  • Fixed a case where an empty JSON file would cause the LSP server to crash.

Linter

Enhancements

  • useNamingConvention now accepts import namespaces in PascalCase and rejects export namespaces in CONSTANT_CASE.

    The following code is now valid:

    import * as React from "react";

    And the following code is now invalid:

    export * as MY_NAMESPACE from "./lib.js";

What's Changed

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

CLI v1.1.1

07 Sep 09:56
a947fc9
Compare
Choose a tag to compare

Analyzer

Bug fixes

  • The diagnostic for // rome-ignore suppression comment should not be a warning. A warning could block the CI, marking a gradual migration difficult. The code action that changes // rome-ignore to // biome-ignore is disabled as consequence.

What's Changed

New Contributors

Full Changelog: cli/v1.1.0...cli/v1.1.1

VSCode Extension v1.2.0

06 Sep 19:10
f015196
Compare
Choose a tag to compare

Analyzer

Enhancements

  • Add a code action to replace rome-ignore with biome-ignore. Use biome check --apply-unsafe to update all the comments. The action is not bulletproof, and it might generate unwanted code, that's why it's unsafe action.

CLI

Enhancements

  • Biome now reports a diagnostics when a rome.json file is found.
  • biome migrate --write creates biome.json from rome.json, but it won't delete the rome.json file.

Bug fixes

  • Biome uses biome.json first, then it attempts to use rome.json.
  • Fix a case where Biome couldn't compute correctly the ignored files when the VSC integration is enabled.

Configuration

Editors

Bug fixes

  • The LSP now uses its own socket and won't rely on Biome's socket. This fixes some cases where users were seeing
    multiple servers in the rage output.

Formatter

Enhancements

  • You can use // biome-ignore as suppression comment.
  • The // rome-ignore suppression is deprecated.

JavaScript APIs

Linter

Enhancements

  • useTemplate now reports all string concatenations.

    Previously, the rule ignored concatenation of a value and a newline or a backquote.
    For example, the following concatenation was not reported:

    v + "\n";
    "`" + v + "`";

    The rule now reports these cases and suggests the following code fixes:

    - v + "\n";
    + `${v}\n`;
    - v + "`";
    + `\`${v}\``;
  • useExponentiationOperator suggests better code fixes.

    The rule now preserves any comment preceding the exponent,
    and it preserves any parenthesis around the base or the exponent.
    It also adds spaces around the exponentiation operator **,
    and always adds parentheses for pre- and post-updates.

    - Math.pow(a++, /**/ (2))
    + (a++) ** /**/ (2)
  • You can use // biome-ignore as suppression comment.

  • The // rome-ignore suppression is deprecated.

  • noUselessConstructor now ignores decorated classes and decorated parameters.
    The rule now gives suggestions instead of safe fixes when parameters are annotated with types.

Bug fixes

  • Fix #80, making noDuplicateJsxProps case-insensitive.

    Some frameworks, such as Material UI, rely on the case-sensitivity of JSX properties.
    For example, TextField has two properties with the same name, but distinct cases:

    <TextField inputLabelProps="" InputLabelProps=""></TextField>
  • Fix #138

    noCommaOperator now correctly ignores all use of comma operators inside the update part of a for loop.
    The following code is now correctly ignored:

    for (
      let i = 0, j = 1, k = 2;
      i < 100;
      i++, j++, k++
    ) {}
  • Fix rome#4713.

    Previously, useTemplate made the following suggestion:

    - a + b + "px"
    + `${a}${b}px`

    This breaks code where a and b are numbers.

    Now, the rule makes the following suggestion:

    - a + b + "px"
    + `${a + b}px`
  • Fix rome#4109

    Previously, useTemplate suggested an invalid code fix when a leading or trailing single-line comment was present:

      // leading comment
    - 1 /* inner comment */ + "+" + 2 // trailing comment
    + `${// leading comment
    + 1 /* inner comment */}+${2 //trailing comment}` // trailing comment

    Now, the rule correctly handle this case:

      // leading comment
    - 1 + "+" + 2 // trailing comment
    + `${1}+${2}` // trailing comment

    As a sideeffect, the rule also suggests the removal of any inner comments.

  • Fix rome#3850

    Previously useExponentiationOperator suggested invalid code in a specific edge case:

    - 1 +Math.pow(++a, 2)
    + 1 +++a**2

    Now, the rule properly adds parentheses:

    - 1 +Math.pow(++a, 2)
    + 1 +(++a) ** 2
  • Fix #106

    noUndeclaredVariables now correctly recognizes some TypeScript types such as Uppercase.

  • Fix rome#4616

    Previously noUnreachableSuper reported valid codes with complex nesting of control flow structures.

What's Changed

New Contributors

Read more