Biome is a performant linter for JavaScript, TypeScript, JSX, CSS and GraphQL that features more than 270 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.
# format files
npx @biomejs/biome format --write ./src
# lint files and apply the safe fixes
npx @biomejs/biome lint --write ./src
# run format, lint, etc. and apply the safe fixes
npx @biomejs/biome check --write ./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 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.
Improved the message for unused suppression comments. Contributed by @dyc3
Fix #4228, where the rule a11y/noInteractiveElementToNoninteractiveRole incorrectly reports a role for non-interactive elements. Contributed by @eryue0220
noSuspiciousSemicolonInJsx now catches suspicious semicolons in React fragments. Contributed by @vasucp1207
The syntax rule noTypeOnlyImportAttributes now ignores .cts files (#4361).
Since TypeScript 5.3, type-only imports can be associated to an import attribute in CommonJS-enabled files.
See the TypeScript docs.
The following code is no longer reported as a syntax error:
import type { TypeFromRequire } from "pkg" with {
"resolution-mode": "require"
};
Note that this is only allowed in files ending with the cts extension.
Contributed by @Conaclos
CLI
Enhancements
The --summary reporter now reports parsing diagnostics too. Contributed by @ematipico
Improved performance of GritQL queries by roughly 25-30%. Contributed by @arendjr
Configuration
Bug fixes
Fix an issue where the JSON schema marked lint rules options as mandatory. Contributed by @ematipico
Editors
Formatter
Bug fixes
Fix #4121. Respect line width when printing multiline strings. Contributed by @ah-yu
Fix #4384. Keep @charset dobule quote under any situation for css syntax rule. Contributed by @fireairforce
Biome no longer crashes when it encounters a string that contain a multibyte character (#4181).
This fixes a regression introduced in Biome 1.9.3
The regression affected the following linter rules:
nursery/useSortedClasses
nursery/useTrimStartEnd
style/useTemplate
suspicious/noMisleadingCharacterClass
Contributed by @Conaclos
Fix #4190, where the rule noMissingVarFunction wrongly reported a variable as missing when used inside a var() function that was a newline. Contributed by @ematipico
Fix #4041. Now the rule useSortedClasses won't be triggered if className is composed only by inlined variables. Contributed by @ematipico
The rule allows the filename to be named as one of the exports of the module.
For instance, the file containing the following export can be named Button.
class Button {}
export { Button }
The rule now correctly handles the renaming of an export.
For example, the file containing the following export can only be named Button.
Previously the rule expected the file to be named A.
The following code calc-size is no longer reported as unknown:
.a { height: calc-size(0px); }
Contributed by @fireairforce
useNamingConvention now allows configuring conventions for readonly index signatures.
Contributed by @sepruko
noDuplicateCustomProperties now correctly handles custom properties and ignores non-custom properties.
Previously, the rule incorrectly reported duplicates for all properties, including non-custom ones. Contributed by @togami2864
Parser
Bug Fixes
The CSS parser now accepts more emoji in identifiers (#3627).
Browsers accept more emoji than the standard allows.
Biome now accepts these additional emojis.
The following code is now correctly parsed:
p {
--✨-color: red;
color: var(--✨-color);
}
Contributed by @Conaclos
Add support for parsing typescript's resolution-mode in Import Types(#2115)
Biome is a toolchain for the web: formatter, linter and more
The npm package @biomejs/biome receives a total of 883,776 weekly downloads. As such, @biomejs/biome popularity was classified as popular.
We found that @biomejs/biome demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.It has 4 open source maintainers collaborating on the project.
Package last updated on 17 Oct 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.