biome
Biome is one fast toolchain for the web, linting, formatting and sorting imports of JavaScript, TypeScript, JSX, TSX, JSON, CSS and GraphQL files with a single Rust binary. MegaLinter runs biome check, which applies lint rules, formatting checks and assist actions in a single pass.
Key Features:
- All-in-one toolchain: linter, formatter and import sorter in a single tool, replacing several separate dependencies
- Rust performance: checks large codebases in milliseconds
- Sensible defaults: hundreds of lint rules with recommended presets, most of them providing safe automatic fixes
- Formatter compatibility: about 97% compatibility with Prettier output
- Inline suppressions: granular control with
// biome-ignorecomments - First-class monorepo support: nested configurations with
extendsand root detection
Activation: this linter runs only if a biome.json or biome.jsonc configuration file is found in your repository. Apply safe fixes automatically with APPLY_FIXES.
biome documentation
- Version in MegaLinter: 2.5.7
- Visit Official Web Site
- See How to configure biome rules
- See How to disable biome rules in files
- See Index of problems detected by biome
Configuration in MegaLinter
- Enable biome by adding
CSS_BIOMEin ENABLE_LINTERS variable - Disable biome by adding
CSS_BIOMEin DISABLE_LINTERS variable
- Enable autofixes by adding
CSS_BIOMEin APPLY_FIXES variable
| Variable | Description | Default value |
|---|---|---|
| CSS_BIOME_ARGUMENTS | User custom arguments to add in linter CLI call Ex: -s --foo "bar" |
|
| CSS_BIOME_COMMAND_REMOVE_ARGUMENTS | User custom arguments to remove from command line before calling the linter Ex: -s --foo "bar" |
|
| CSS_BIOME_FILTER_REGEX_INCLUDE | Custom regex including filter Ex: (src\|lib)⚠️ Not available with CSS_BIOME_CLI_LINT_MODE = project |
Exclude no file |
| CSS_BIOME_FILTER_REGEX_EXCLUDE | Custom regex excluding filter Ex: (test\|examples)⚠️ Not available with CSS_BIOME_CLI_LINT_MODE = project |
Exclude no file |
| CSS_BIOME_CLI_LINT_MODE | Override default CLI lint mode - file: Calls the linter for each file- list_of_files: Call the linter with the list of files as argument- project: Call the linter from the root of the project |
list_of_files |
| CSS_BIOME_FORWARD_EXCLUDED_DIRECTORIES | In project CLI lint mode, forward excluded directories (EXCLUDED_DIRECTORIES + ADDITIONAL_EXCLUDED_DIRECTORIES) to the linter through its native exclusion arguments or generated ignore/config files | true |
| CSS_BIOME_FILE_EXTENSIONS | Allowed file extensions. "*" matches any extension, "" matches empty extension. Empty list excludes all filesEx: [".py", ""] |
[".css"] |
| CSS_BIOME_FILE_NAMES_REGEX | File name regex filters. Regular expression list for filtering files by their base names using regex full match. Empty list includes all files Ex: ["Dockerfile(-.+)?", "Jenkinsfile"] |
Include every file |
| CSS_BIOME_PRE_COMMANDS | List of bash commands to run before the linter | None |
| CSS_BIOME_POST_COMMANDS | List of bash commands to run after the linter | None |
| CSS_BIOME_UNSECURED_ENV_VARIABLES | List of env variables explicitly not filtered before calling CSS_BIOME and its pre/post commands | None |
| CSS_BIOME_CONFIG_FILE | biome configuration file name Use LINTER_DEFAULT to let the linter find it |
biome.json |
| CSS_BIOME_RULES_PATH | Path where to find linter configuration file | Workspace folder, then MegaLinter default rules |
| CSS_BIOME_DISABLE_ERRORS | Run linter but consider errors as warnings | false |
| CSS_BIOME_DISABLE_ERRORS_IF_LESS_THAN | Maximum number of errors allowed | 0 |
| CSS_BIOME_TIMEOUT_SECONDS | Maximum duration in seconds of the linter run, after which the linter process and its child processes are killed and reported as an error (exit code 124). Overrides LINTER_TIMEOUT_SECONDS. 0 disables the timeout | 300 |
| CSS_BIOME_CLI_EXECUTABLE | Override CLI executable | ['biome'] |
IDE Integration
Use biome in your favorite IDE to catch errors before MegaLinter !
| IDE | Extension Name | Install | |
|---|---|---|---|
| IDEA | Biome | ||
| Visual Studio Code | Biome | ![]() |
MegaLinter Flavors
This linter is available in the following flavors
| Flavor | Description | Embedded linters | Info | |
|---|---|---|---|---|
![]() |
all | Default MegaLinter Flavor | 131 | |
| cupcake | MegaLinter for the most commonly used languages | 98 | ||
| dotnetweb | Optimized for C, C++, C# or VB based projects with JS/TS | 82 | ||
| javascript | Optimized for JAVASCRIPT or TYPESCRIPT based projects | 69 |
Behind the scenes
How are identified applicable files
- Activated only if one of these files is found:
biome.json, biome.jsonc - File extensions:
.css
How the linting is performed
biome is called once on the whole project directory (project CLI lint mode)
- filtering can not be done using MegaLinter configuration variables,it must be done using biome configuration or ignore file (if existing)
VALIDATE_ALL_CODEBASE: falsedoesn't make biome analyze only updated files
Example calls
biome check myfile.css
biome check --config-path biome.json myfile.css
biome check --write myfile.css
Help content
Biome's command-line interface for checking, formatting, and linting files, managing configuration,
and interacting with the daemon.
Usage: biome COMMAND ...
Available options:
-h, --help Prints help information
-V, --version Prints version information
Available commands:
version Prints the Biome CLI version and information about the connected daemon server,
if any, then exits.
upgrade Upgrades Biome to the latest stable version.
rage Prints a troubleshooting report with CLI, platform, environment, configuration,
workspace, and daemon server information.
start Starts the Biome daemon server used for integration with third-party clients,
such as editor extensions.
stop Stops the Biome daemon server if it is running.
check Checks the specified files for formatting, linting, and assist actions.
lint Runs the linter on the specified files.
format Formats the specified files.
ci Runs formatting checks, linting checks, and assist actions in CI without
modifying files.
init Creates a default Biome configuration file in the current working directory.
lsp-proxy Ensures that the Biome daemon server is running, then forwards Language Server
Protocol messages between the daemon server and standard input and output.
migrate Previews configuration updates required by breaking changes. The `prettier` and
`eslint` subcommands instead import settings from those tools.
search Finds code that matches a GritQL pattern. This command is experimental.
explain Prints documentation for a lint rule or the path to the daemon server log
directory.
clean Removes the Biome daemon server log files.
Installation on mega-linter Docker image
- Dockerfile commands :
# Parent descriptor install # renovate: datasource=npm depName=typescript ARG NPM_TYPESCRIPT_VERSION=6.0.3 # Linter install # renovate: datasource=npm depName=@biomejs/biome ARG NPM_BIOMEJS_BIOME_VERSION=2.5.7
- NPM packages (node.js):

