biome-code-review
Use only for reviewing completed Biome PRs, branches, commit ranges, diffs, or working trees against business logic and requirements. Excludes broad…
Use this skill when `biome migrate eslint` must preserve configurable ESLint rule options through source-option models, Biome conversions, typed rule variants, and migration fixtures. Do not use for generated severity-only mapping or general rule-option design.
$ npx -y skills add biomejs/biome --skill eslint-migrate-options --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/eslint-migrate-optionsContext preview
The summary Claude sees to decide when to auto-load this skill.
Use this skill when `biome migrate eslint` must preserve configurable ESLint rule options through source-option models, Biome conversions, typed rule variants, and migration fixtures. Do not use for generated severity-only mapping or general rule-option design.
name: eslint-migrate-options description: Use this skill when `biome migrate eslint` must preserve configurable ESLint rule options through source-option models, Biome conversions, typed rule variants, and migration fixtures. Do not use for generated severity-only mapping or general rule-option design. compatibility: Designed for coding agents working on the Biome codebase (github.com/biomejs/biome).
Use a custom migrator only when an existing Biome rule should preserve meaningful ESLint options. Severity-only migration belongs to the generated rule mapping.
Confirm before editing:
1. The Biome rule and its option type already exist. 2. Rule metadata identifies the ESLint source rule. 3. Generated severity migration already exists or will be regenerated. 4. Official ESLint or plugin documentation establishes the exact option shape and defaults. 5. The supported Biome semantics are clear, including unsupported source options.
Load `lint-rule-development` when the Biome rule or its own options still need implementation.
Custom migration has four parts:
1. A plugin-specific type deserializes the ESLint payload. 2. A conversion maps source semantics into the Biome option type. 3. The shared ESLint `Rule` enum recognizes the rule as a typed variant. 4. `migrate_eslint_rule()` installs the resulting Biome configuration after common severity handling.
| File | Responsibility | | --- | --- | | `eslint_eslint.rs` | Shared config model, `Rule`, `RuleConf<T>`, and dispatch | | `eslint_unicorn.rs` | Unicorn option types and conversions | | `eslint_typescript.rs` | TypeScript ESLint option types and conversions | | `eslint_jsxa11y.rs` | JSX accessibility option types and conversions | | `eslint_to_biome.rs` | Main conversion and custom migration arms | | `eslint_any_rule_to_biome.rs` | Generated severity mapping | | `tests/specs/migrate_eslint/` | Fixture-driven migration snapshots |
Use the plugin-specific module matching the source rule and inspect a current migrator with a similar payload and Biome configuration type.
Model the ESLint JSON shape rather than the Biome destination shape.
Do not assume source and destination defaults are equivalent.
Implement conversion next to the source option type.
The conversion should make unsupported and default behavior obvious from its branches rather than relying on field-for-field assignment.
Update all typed dispatch points in `eslint_eslint.rs`:
Search the enum's matches after adding the variant so no dispatch site remains stale.
Add the custom arm in `migrate_eslint_rule()` and call `migrate_eslint_any_rule()` first. The common path owns severity tracking, unsupported-rule reporting, and deduplication.
Use the destination rule's actual group and configuration type:
Choose the `RuleConf` access pattern matching the source schema:
Copy a current analogous arm rather than relying on remembered struct fields.
Add focused fixtures under `crates/biome_cli/tests/specs/migrate_eslint/` for:
Run the focused migration tests and inspect adjacent snapshots. Run analyzer option tests too when migration output depends on rule semantics.
Typical commands:
cargo check -p biome_cli cargo test -p biome_cli migrate_eslint
A toolchain for web projects, aimed to provide functionalities to maintain them. Biome offers formatter and linter, usable via CLI and LSP.
Repo: biomejs/biome
Use only for reviewing completed Biome PRs, branches, commit ranges, diffs, or working trees against business logic and requirements. Excludes broad…
Use this skill when a Biome change may affect users and you must decide whether it needs a changeset, choose the release level, or create and edit…
Use this skill when designing or implementing Biome user-facing diagnostic presentation or APIs, including messages, advice, markup, details, code frames,…
Use this skill whenever writing or editing Rust `//`, `///`, or `//!` comments in Biome, including comments added incidentally and end-user rustdoc inside…
Use this skill whenever implementing or debugging Biome formatter behavior, IR composition, node rules, layout selection, source-comment handling, verbatim…
Use this skill when creating or modifying Biome lint rules or assists, including analyzer queries, semantic bindings, rule state, code actions, fix safety,…