Socket
Socket
Sign inDemoInstall

@biomejs/biome

Package Overview
Dependencies
0
Maintainers
4
Versions
63
Alerts
File Explorer

Advanced tools

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
536K
increased by19.94%
Maintainers
4
Created
Weekly downloads
 

Changelog

Source

1.5.2 (2024-01-15)

CLI

Bug fixes

  • Fix #1512 by skipping verbose diagnostics from the count. Contributed by @ematipico

  • Correctly handle cascading include and ignore.

    Previously Biome incorrectly included files that were included at tool level and ignored at global level. In the following example, file.js was formatted when it should have been ignored. Now, Biome correctly ignores the directory ./src/sub/.

    ❯ tree src
      src
      └── sub
          └── file.js
    
    ❯ cat biome.json
      {
        "files": { "ignore": ["./src/sub/"] },
        "formatter": { "include": ["./src"] }
      }
    

    Contributed by @Conaclos

  • Don't emit verbose warnings when a protected file is ignored.

    Some files, such as package.json and tsconfig.json, are protected. Biome emits a verbose warning when it encounters a protected file.

    Previously, Biome emitted this verbose warning even if the file was ignored by the configuration. Now, it doesn't emit verbose warnings for protected files that are ignored.

    Contributed by @Conaclos

  • overrides no longer affect which files are ignored. Contributed by @Conaclos

  • The file biome.json can't be ignored anymore. Contributed by @ematipico

  • Fix #1541 where the content of protected files wasn't returned to stdout. Contributed by @ematipico

  • Don't handle CSS files, the formatter isn't ready yet. Contributed by @ematipico

Configuration

Bug fixes
  • Fix 1440, a case where extends and overrides weren't correctly emitting the final configuration. Contributed by @arendjr

  • Correctly handle include when ignore is set (#1468). Contributed by @Conaclos

    Previously, Biome ignored include if ignore was set. Now, Biome check both include and ignore. A file is processed if it is included and not ignored. If include is not set all files are considered included.

Formatter

Bug fixes
  • Fix placement of comments before * token in generator methods with decorators. #1537 Contributed by @ah-yu

  • Fix #1406. Ensure comments before the async keyword are placed before it. Contributed by @ah-yu

  • Fix #1172. Fix placement of line comment after function expression parentheses, they are now attached to first statement in body. Contributed by @kalleep

  • Fix #1511 that made the JavaScript formatter crash. Contributed @Conaclos

Linter

Enhancements
  • Add an unsafe code fix for noConsoleLog. Contributed by @vasucp1207

  • useArrowFunction no longer reports function in extends clauses or in a new expression. Contributed by @Conaclos

    These cases require the presence of a prototype.

  • Add dependency variable names on error message when useExhaustiveDependencies rule shows errors. Contributed by @mehm8128

Bug fixes
  • The fix of useArrowFunction now adds parentheses around the arrow function in more cases where it is needed (#1524).

    A function expression doesn't need parentheses in most expressions where it can appear. This is not the case with the arrow function. We previously added parentheses when the function appears in a call or member expression. We now add parentheses in binary-like expressions and other cases where they are needed, hopefully covering all cases.

    Previously:

    - f = f ?? function() {};
    + f = f ?? () => {};
    

    Now:

    - f = f ?? function() {};
    + f = f ?? (() => {});
    

    Contributed by @Conaclos

  • Fix #1514. Fix autofix suggestion to avoid the syntax error in no_useless_fragments. Contributed by @togami2864

Readme

Source

Shows the banner of Biome, with its logo and the phrase 'Biome - Toolchain of the web'.

Biome is a performant toolchain for web projects, it aims to provide developer tools to maintain the health of said projects.

Biome is a fast formatter for JavaScript, TypeScript, JSX, and JSON that scores 97% compatibility with Prettier.

Biome is a performant linter for JavaScript, TypeScript, and JSX that features more than 190 rules from ESLint, TypeScript ESLint, and other sources. It outputs detailed and contextualized diagnostics that help you to improve your code and become a better programmer!

Biome is designed from the start to be used interactively within an editor. It can format and lint malformed code as you are writing it.

Installation

npm install --save-dev --save-exact @biomejs/biome

Usage

# format files
npx @biomejs/biome format --write ./src

# lint files
npx @biomejs/biome lint ./src

# run format, lint, etc. and apply the safe suggestions
npx @biomejs/biome check --apply ./src

# check all files against format, lint, etc. in CI environments
npx @biomejs/biome ci ./src

If you want to give Biome a run without installing it, use the online playground, compiled to WebAssembly.

Documentation

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

More about Biome

Biome has sane defaults and it doesn't require configuration.

Biome aims to support all main languages of modern web development.

Biome doesn't require Node.js to function.

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

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, parallelize work, caching, and configuration.

Read more about our project philosophy.

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

Sponsors

Gold Sponsors

Bronze Sponsors

Keywords

FAQs

Last updated on 15 Jan 2024

Did you know?

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