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.
68
81%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
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:
Load lint-rule-development when the Biome rule or its own options still need implementation.
Custom migration has four parts:
Rule enum recognizes the rule as a typed variant.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:
RuleConf<SourceOptions> to Rule;Rule::name();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:
RuleFixConfiguration::WithOptions for fixable rules;RuleConfiguration::WithOptions for non-fixable rules.Choose the RuleConf access pattern matching the source schema:
option_or_default() when severity-only input should map through source defaults;RuleConf::Option matching when options should attach only when supplied;into_vec() for array payloads requiring aggregation or normalization.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_eslintcrates/biome_cli/src/execute/migrate/crates/biome_rule_options/src/xtask/codegen/src/generate_migrate_eslint.rs7d54688
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.