Socket
Socket
Sign inDemoInstall

@biomejs/biome

Package Overview
Dependencies
6
Maintainers
4
Versions
63
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@biomejs/biome


Version published
Maintainers
4
Install size
14.5 MB
Created

Changelog

Source

1.1.0 (2023-09-06)

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. Contributed by @ematipico

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. Contributed by @ematipico
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. Contributed by @ematipico

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

New features
  • Add useCollapsedElseIf rule. This new rule requires merging an else and an if, if the if statement is the only statement in the else block. Contributed by @n-gude
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}\``;
    

    Contributed by @Conaclos

  • 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)
    

    Contributed by @Conaclos

  • You can use // biome-ignore as suppression comment.

  • The // rome-ignore suppression is deprecated.

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>
    

    Contributed by @Conaclos

  • 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++
    ) {}
    

    Contributed by @Conaclos

  • 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`
    

    Contributed by @Conaclos

  • 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 handles 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.

    Contributed by @Conaclos

  • 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
    

    Contributed by @Conaclos

  • Fix #106

    noUndeclaredVariables now correctly recognizes some TypeScript types such as Uppercase.

    Contributed by @Conaclos

  • Fix rome#4616

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

    Contributed by @Conaclos

Readme

Source

Biome - Toolchain of the web

Biome formats and lints your code in a fraction of a second.

Biome supports JavaScript, TypeScript, JSON, and CSS. It aims to support all main languages of modern web development.

Biome has sane defaults and requires minimal configuration. Biome helps you as much as possible by displaying detailed and contextualized diagnostics. Read more about our project philosophy.

Biome unifies functionality that has previously been separate tools. Building upon a shared base allows us to provide a cohesive experience for processing code, displaying errors, parallelizing work, caching, and configuration.

Biome is designed to eventually replace Babel, ESLint, webpack, Prettier, Jest, and others.

Biome has first-class IDE support, with a sophisticated parser that represents the source text in full fidelity and top-notch error recovery.

Biome is MIT licensed and moderated under the Contributor Covenant Code of Conduct.

Documentation

Check out our homepage to learn more about Biome, or directly head to the Getting Started guide to start using Biome.

Keywords

FAQs

Last updated on 06 Sep 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc