Assist
Biome assist offers a series of actions (or rules) meant to improve code quality and DX of the users.
Contrary to linter rules, assist actions are meant for editors and IDEs, and they can include things like sorting of properties or fields, simplification of binary expressions and more. The assist has 3 actions.
Assist actions are very close LSP code actions in semantics.
Biome assist is enabled by default. In the following example, you can enable the assist and enable the action useSortedKeys
:
{ "assist": { "enabled": true, "actions": { "source": { "useSortedKeys": "on" } } }}
Enforce assist actions via CLI
Section titled Enforce assist actions via CLIAssist actions can be enforced via CLI via check
command:
npx @biomejs/biome check
yarn biome check
pnpm biome check
bunx biome check
deno run -A npm:@biomejs/biome check
However, the check
is meant for running multiple tools at once, so if you want to check only the assist actions, you should run:
npx @biomejs/biome check --formatter-enabled=false --linter-enabled=false --organize-imports-enabled=false
yarn biome check --formatter-enabled=false --linter-enabled=false --organize-imports-enabled=false
pnpm biome check --formatter-enabled=false --linter-enabled=false --organize-imports-enabled=false
bunx biome check --formatter-enabled=false --linter-enabled=false --organize-imports-enabled=false
deno run -A npm:@biomejs/biome check --formatter-enabled=false --linter-enabled=false --organize-imports-enabled=false