biome README

The project's README from github.com/biomejs/biome. As one markdown file: README.md.

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

CI on main Discord chat npm version VSCode version Open VSX version

हिन्दी | English | Español | Français | 繁體中文 | 简体中文 | 日本語 | Polski | Português do Brasil | 한국어 | Русский | Українська


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, JSON, CSS and GraphQL that scores 97% compatibility with Prettier.

Biome is a performant linter for JavaScript, TypeScript, JSX, JSON, CSS, and GraphQL that features more than 500 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

# lint files and apply the safe fixes
npx @biomejs/biome lint --write

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

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

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 wants to offer a high-quality Developer Experience, with descriptive diagnostics and great performance.

Biome unifies functionalities that have 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.

Funding

You can fund the project in different ways

Project sponsorship and funding

You can sponsor or fund the project via Open collective or GitHub sponsors

Biome offers a simple sponsorship program that allows companies to get visibility and recognition among various developers.

Biome offers enterprise support, where Core Contributors can be employed to work on company-focused projects.

Sponsors

Platinum Sponsors

Depot logo

Gold Sponsors

CodSpeed logo

Silver Sponsors

Lokalise logo Latitude logo Cloudflare logo

Bronze Sponsors

Vital logo CodeRabbit logo Forge42 logo RStudio logo Pennylane logo JetBrains logo EGSTOCK, Inc. logo Convex logo Graphite logo Kraken Tech logo

biome (biomejs/biome)

Searching Database…

26K ·GitHub
这是什么?Biome 是一个面向 Web 项目的工具链:一个速度很快的工具,既能格式化也能做代码检查(lint),支持 JavaScript、TypeScript、JSX、JSON、CSS 和 GraphQL,可以通过命令行运行,也可以借助 LSP 在编辑器里使用。
那它能替代同时运行 Prettier 和 ESLint 吗?基本上可以。它把格式化器和 linter 这两个原本各自独立的工具统一到同一个共享基础上,因此你得到的是一份配置、共享的缓存和并行执行,而不是拼凑起来的工具链。
我该怎么开始用它?按照 Getting Started 指南把它添加到你的项目里,或者先在在线 playground 上试用——这个 playground 是用 WebAssembly 编译的。没有强制性的配置步骤:Biome 自带合理的默认值,不用配置文件也能直接工作。
必须装了 Node.js 它才能运行吗?不需要。Biome 用 Rust 编写,不依赖 Node.js 也能运行——你用的是独立的可执行文件,无需 JS 运行时。
如果我的文件有语法错误,格式化器是不是就直接拒绝运行了?它不是拒绝处理出错的代码,而是能妥善应对:解析器有出色的错误恢复能力,所以 Biome 可以对格式有问题的文件进行格式化和检查,甚至你还在编辑器里打字的时候也可以。
它是纯命令行工具,还是可以装在我的编辑器里?两者都行。它从设计之初就考虑了在编辑器内交互使用,拥有一流的 LSP 支持,并提供官方的 VS Code 和 Open VSX 扩展;同时命令行工具负责脚本和 CI 场景。
Biome 的格式化结果和 Prettier 有多接近?非常接近:格式化器与 Prettier 的兼容度达到 97%,所以换用 Biome 通常不会把你的整个代码库重新格式化一遍。
它的 lint 规则是从哪来的?这个 linter 提供了 500 多条规则,来自 ESLint、typescript-eslint 等来源,并且带有详细、结合上下文的诊断信息。
为什么要做一个工具,而不是用 Prettier 加 ESLint?工具一分开,配置、解析器和运行过程也就跟着分开。把所有东西建立在同一个共享基础上,Biome 才能在处理代码、展示错误、并行执行和缓存这些方面提供一致连贯的体验。
可以免费使用吗,公司使用也免费吗?可以——它采用 MIT 或 Apache 2.0 双许可证。公司还可以选择赞助该项目或购买企业支持,由核心贡献者围绕公司的具体需求开展工作。
What are similar projects?oxc, tools, prettier, rubocop, eslint, ruff, knip, fallow
Creator
biomejs
Size
285.9 MB
Stars
26K
Age
3y
Commits · 90 Days