Skip to content

Releases: biomejs/biome

CLI v1.1.0

06 Sep 19:10
7791ba3
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

VSCode Extension v1.0.1

29 Aug 17:19
9b86ed7
Compare
Choose a tag to compare

What's Changed

  • fix(vscode): enable and recognise JSONC files by @ematipico in #80

New Contributors

Full Changelog: cli/v1.0.0...lsp/v1.0.1

VSCode Extension v1.0.0

28 Aug 06:59
b53e79c
Compare
Choose a tag to compare

What's Changed

  • docs(website): improve formatting, remove an erroneous link by @Conaclos in #67
  • fix(lint/noUselessConstructor): ignore constructor with default params by @Conaclos in #71
  • ci(labeler): add A-Changelog label by @Conaclos in #72
  • release: v1.0.0 by @ematipico in #73

Full Changelog: lsp/v0.3.0...lsp/v1.0.0

CLI v1.0.0

28 Aug 06:59
b53e79c
Compare
Choose a tag to compare

What's Changed

  • docs(website): improve formatting, remove an erroneous link by @Conaclos in #67
  • fix(lint/noUselessConstructor): ignore constructor with default params by @Conaclos in #71
  • ci(labeler): add A-Changelog label by @Conaclos in #72
  • release: v1.0.0 by @ematipico in #73

Full Changelog: lsp/v0.3.0...cli/v1.0.0

VSCode Extension v0.3.0

25 Aug 10:01
3900831
Compare
Choose a tag to compare

What's Changed

  • fix(lsp): don't apply unsafe quick fixes on-save by @Conaclos in #62
  • fix: show warning for unresolved binary by @ematipico in #63
  • docs(website): update supported version of JavaScript and TypeScript by @Conaclos in #64
  • docs(website): fix typo by @Conaclos in #65

Full Changelog: cli/v0.2.3...lsp/v0.3.0

VSCode Extension v0.2.2

24 Aug 19:51
Compare
Choose a tag to compare

What's Changed

  • refactor(lint/useGetterReturn): improve rule docs by @Conaclos in #26
  • chore: better readme and code of conduct by @ematipico in #33
  • chore: better readme and code of conduct by @ematipico in #35
  • refactor: avoid some cloning by @Conaclos in #36
  • feat(lint/noConstantCondition): allow while(true) by @Conaclos in #25
  • refactor(website): rome.json -> biome.json by @Conaclos in #37
  • feat(lint): noUselessThisAlias by @Conaclos in #23
  • chore: add --provenance flag to the npm publish command by @nissy-dev in #60

Full Changelog: cli/v0.2.0-nightly.0b5a3fd...lsp/v0.2.2

CLI v0.2.3

24 Aug 21:03
Compare
Choose a tag to compare

VSCode Extension v0.3.20230822

22 Aug 00:50
0b5a3fd
Compare
Choose a tag to compare
Pre-release

What's Changed

  • feat(rome_js_analyze): useGetterReturn by @Conaclos in #1
  • fix(lint/useEnumInitailizers): ignore enum in ambient namespaces by @Conaclos in #20
  • fix(lint/noUnsafeDeclarationMerging): recoggnize ambient classes in ambient namespace by @Conaclos in #24
  • fix(cli): correct message emitted during linting by @ematipico in #27
  • chore: start blog by @ematipico in #22
  • refactor(lint): update rule versions to 1.0.0 by @Conaclos in #31
  • feat(cli): support for biome.json by @ematipico in #30
  • refactor(favicon): use background-less favicon by @Conaclos in #32

Full Changelog: cli/v0.2.0...lsp/v0.3.20230822

VSCode Extension v0.2.0

20 Aug 19:56
4b26fd1
Compare
Choose a tag to compare

What's Changed

Full Changelog: cli/v0.1.2...lsp/v0.2.0

CLI v0.2.0

20 Aug 19:47
4b26fd1
Compare
Choose a tag to compare

What's Changed

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