Socket
Socket
Sign inDemoInstall

@biomejs/biome

Package Overview
Dependencies
Maintainers
4
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@biomejs/biome

Biome is a toolchain for the web: formatter, linter and more


Version published
Weekly downloads
595K
increased by7.96%
Maintainers
4
Created
Weekly downloads
 

Changelog

Source

1.2.0 (2023-09-15)

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
  • Add noConfusingVoidType rule. The rule reports the unusual use of the void type. Contributed by @shulandmimi
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 the 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

Bug fixes
  • Fix #182, making useLiteralKeys retains optional chaining. Contributed by @denbezrukov

  • Fix #168, fix useExhaustiveDependencies false positive case when stable hook is on a new line. Contributed by @denbezrukov

  • Fix #137, fix noRedeclare false positive case with TypeScript module declaration:

    declare module '*.gif' {
        const src: string;
    }
    
    declare module '*.bmp' {
        const src: string;
    }
    

    Contributed by @denbezrukov

  • Fix #258, fix noUselessFragments the case where the rule removing an assignment. Contributed by @denbezrukov

  • Fix #266, where complexity/useLiteralKeys emitted a code action with an invalid AST. Contributed by @ematipico

  • Fix #105, removing false positives reported by noUnusedVariables.

    The rule no longer reports the following used variable:

    const a = f(() => a);
    

    Contributed by @Conaclos

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.

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

Package last updated on 15 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
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc