Socket
Socket
Sign inDemoInstall

@biomejs/biome

Package Overview
Dependencies
8
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
Install size
18.9 MB
Created
Weekly downloads
 

Changelog

Source

1.5.3 (2024-01-22)

LSP

Bug fixes
  • Fix #1584. Ensure the LSP only registers the formatter once. Contributed by @nhedger

  • Fix #1589. Fix invalid formatting of own line comments when they were at the end of an import/export list. Contributed by @spanishpear

Configuration

Bug fixes
  • Override correctly the recommended preset (#1349).

    Previously, if unspecified, Biome turned on the recommended preset in overrides. This resulted in reporting diagnostics with a severity level set to off. This in turn caused Biome to fail.

    Now Biome won't switch on the recommended preset in overrides unless told to do so.

    Contributed by @Conaclos

  • Don't format ignored files that are well-known JSONC files when files.ignoreUnknown is enabled (#1607).

    Previously, Biome always formatted files that are known to be JSONC files (e.g. .eslintrc) when files.ignoreUnknown was enabled.

    Contributed by @Conaclos

Formatter

New features
  • Add option json.formatter.trailingCommas, to provide a better control over the trailing comma in JSON/JSONC files. Its default value is "none".
Bug fixes
  • Fix #1178, where the line ending option wasn't correctly applied. Contributed by @ematipico
  • Fix #1571. Fix invalid formatting of nested multiline comments. Contributed by @ah-yu

Linter

Bug fixes

Fix #1575. noArrayIndexKey now captures array index value inside template literals and with string concatination. Contributed by @vasucp1207

  • Linter rules that inspect regexes now handle multibyte characters correctly (#1522).

    Previously, noMisleadingCharacterClass, noMultipleSpacesInRegularExpressionLiterals, and noEmptyCharacterClassInRegex made Biome errors on multi-bytes characters. Multibyte characters are now handled correctly.

    The following code no longer raises an internal error:

    // Cyrillic characters
    /[\u200E\u2066-\u2069]/gu;
    

    Contributed by @Conaclos

  • useExhaustiveDependencies no longer made Biome errors in code TypeScript import equal declarations (#1194). Contributed by @Conaclos

  • Fix typo in the diagnostic of noNodejsModules. Contributed by @huseeiin

Parser

Bug fixes
  • Accept the const modifier for type parameter in method type signature (#1624).

    The following code is now correctly parsed:

    type Foo = {
      <const T>();
      method<const T>();
    };
    

    Contributed by @magic-akari

  • Correctly parse type arguments in expression(#1184).

    The following code is now correctly parsed in typescript:

    0 < (0 >= 1);
    

    Contributed by @ah-yu

Website

New
Fixes
  • Generate Open Graph images based on the linked page. Contributed by @ematipico

  • Fix examples of the git hook page. Contributed by @9renpoto, @lmauromb, and @Conaclos

  • Fix dead and erroneous hyperlinks. Contributed by @Sec-ant and Conaclos

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 22 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