Fast
Built with Rust and an innovative architecture inspired by rust-analyzer.
npm i -D -E @biomejs/biomepnpm add -D -E @biomejs/biomebun add -D -E @biomejs/biomedeno add -D npm:@biomejs/biomeyarn add -D -E @biomejs/biomecurl -fsSL https://biomejs.dev/install | bashirm https://biomejs.dev/install.ps1 | iexBiome is a fast formatter for JavaScript, TypeScript, JSX, TSX, JSON, HTML, CSS, SCSS, GraphQL, YAML and Markdown that scores 97% compatibility with Prettier (see known limitations), saving CI and developer time.
Biome can even format malformed code as you write it in your favorite editor.
function HelloWorld({greeting = "hello", greeted = '"World"', silent = false, onMouseOver,}) {
if(!greeting){return null};
// TODO: Don't use random in render let num = Math.floor (Math.random() * 1E+7).toString().replace(/.d+/ig, "")
return <div className='HelloWorld' title={`You are visitor number ${ num }`} onMouseOver={onMouseOver}>
<strong>{ greeting.slice( 0, 1 ).toUpperCase() + greeting.slice(1).toLowerCase() }</strong> {greeting.endsWith(",") ? " " : <span style={{color: 'grey'}}>", "</span> } <em> { greeted } </em> { (silent) ? "." : "!"}
</div>;}function HelloWorld({ greeting = "hello", greeted = '"World"', silent = false, onMouseOver,}) { if (!greeting) { return null; }
// TODO: Don't use random in render let num = Math.floor(Math.random() * 1E+7) .toString() .replace(/.d+/gi, "");
return ( <div className="HelloWorld" title={`You are visitor number ${num}`} onMouseOver={onMouseOver} > <strong> {greeting.slice(0, 1).toUpperCase() + greeting.slice(1).toLowerCase()} </strong> {greeting.endsWith(",") ? ( " " ) : ( <span style={{ color: "grey" }}>", "</span> )} <em>{greeted}</em> {silent ? "." : "!"} </div> );}Faster than Prettier in the official benchmark, on a MacBook Pro with an M1 chip.
Try the Biome formatter on the playground or directly on your project:
npm @biomejs/biome formatpnpm @biomejs/biome formatbun @biomejs/biome formatdeno @biomejs/biome formatyarn @biomejs/biome formatbiome formatBiome is a performant linter for JavaScript, TypeScript, JSX, JSON, HTML, CSS, SCSS, GraphQL, YAML and Markdown that features 880 rules from ESLint, TypeScript ESLint, and other sources.
Biome outputs detailed, contextual diagnostics that explain each problem and how to fix it, so you learn the patterns behind them.
complexity/useFlatMap.js:2:1 lint/complexity/useFlatMap FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✖ The call chain .map().flat() can be replaced with a single .flatMap() call.
1 │ const array = ["split", "the text", "into words"];
> 2 │ array.map(sentence => sentence.split(' ')).flat();
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3 │
ℹ Safe fix: Replace the chain with .flatMap().
1 1 │ const array = ["split", "the text", "into words"];
2 │ - array.map(sentence·=>·sentence.split('·')).flat();
2 │ + array.flatMap(sentence·=>·sentence.split('·'));
3 3 │
Try the Biome linter on the playground or directly on your project:
npm @biomejs/biome lint --writepnpm @biomejs/biome lint --writebun @biomejs/biome lint --writedeno @biomejs/biome lint --writeyarn @biomejs/biome lint --writebiome lint --writeYou can format and lint your code separately, or do it all at once with a single command.
The tools share one configuration and work together as a cohesive toolchain for web projects.
Run all tools with the check command:
npm @biomejs/biome check --writepnpm @biomejs/biome check --writebun @biomejs/biome check --writedeno @biomejs/biome check --writeyarn @biomejs/biome check --writebiome check --writeFast
Built with Rust and an innovative architecture inspired by rust-analyzer.
Simple
Zero configuration needed to get started. When you need more control, one configuration file covers every tool.
Scalable
Designed to handle codebases of any size, so you can focus on your product instead of your tools.
Actionable and informative
No obscure error messages. When Biome reports a problem, it shows you exactly where it is and how to fix it.
Batteries included
Out-of-the-box support for all the language features you use today, and first-class support for TypeScript and JSX.
Enterprise support
Commercial support is available to organizations that need it, through the Biome community of contributors.
Install Biome with your preferred package manager and integrate it in your editor.
Install with package manager
Integrate Biome in your editor
Join thousands of developers and companies using Biome in production
© 2023-present Biome developers and contributors.