Conversation
|
WalkthroughAdded a new enum variant Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@crates/biome_analyze/src/rule.rs`:
- Around line 195-196: Add the missing match arm for the new enum variant so
migrations recognize the typescript-sort-keys plugin: in the match statement
that maps ESLint plugin names to RuleSource inside migrate/eslint_to_biome.rs,
add a branch for the string "typescript-sort-keys" that returns
RuleSource::EslintTypescriptSortKeys (the enum variant EslintTypescriptSortKeys
defined in rule.rs) so the new variant is reachable during migration.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: bf28e7ce-2471-4f8b-a640-3026e4cd83e3
📒 Files selected for processing (2)
crates/biome_analyze/src/rule.rscrates/biome_js_analyze/src/assist/source/use_sorted_interface_members.rs
Merging this PR will not alter performance
Comparing Footnotes
|
693e572 to
0ac078d
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@crates/biome_cli/src/execute/migrate/eslint_to_biome.rs`:
- Line 405: Add a migration snapshot test that asserts the new mapping for
"typescript-sort-keys" resolves to RuleSource::EslintTypescriptSortKeys; locate
the existing migration snapshot test suite for the eslint_to_biome migration
(look for tests that use the migration runner or snapshot helpers) and add a
case that imports a rule path like "typescript-sort-keys/<rule>" and captures
the resulting resolved mapping, then add the expected snapshot (or update the
snapshot generator) so CI will verify that typescript-sort-keys routes through
the new branch.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 2207f06c-2f12-42dd-a224-c879e2b6ae13
📒 Files selected for processing (3)
crates/biome_analyze/src/rule.rscrates/biome_cli/src/execute/migrate/eslint_to_biome.rscrates/biome_js_analyze/src/assist/source/use_sorted_interface_members.rs
✅ Files skipped from review due to trivial changes (2)
- crates/biome_js_analyze/src/assist/source/use_sorted_interface_members.rs
- crates/biome_analyze/src/rule.rs
| Some("vue") => RuleSource::EslintVueJs, | ||
| Some("turbo") => RuleSource::EslintTurbo, | ||
| Some("@html-eslint") => RuleSource::HtmlEslint, | ||
| Some("typescript-sort-keys") => RuleSource::EslintTypescriptSortKeys, |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify whether a migrator spec already covers `typescript-sort-keys`
# Expected: at least one match under migrate_eslint specs or nearby tests.
rg -n --iglob '*.{json,jsonc,rs}' 'typescript-sort-keys|EslintTypescriptSortKeys'Repository: biomejs/biome
Length of output: 1208
🏁 Script executed:
fd -t f . tests/specs/migrate_eslint/ | head -20Repository: biomejs/biome
Length of output: 171
🏁 Script executed:
rg -t json 'typescript-sort-keys' tests/specs/migrate_eslint/ -lRepository: biomejs/biome
Length of output: 124
🏁 Script executed:
fd -t f migrate_eslint tests/Repository: biomejs/biome
Length of output: 150
🏁 Script executed:
fd -t d migrate tests/Repository: biomejs/biome
Length of output: 150
🏁 Script executed:
git ls-files | grep -i migrate | head -20Repository: biomejs/biome
Length of output: 1084
🏁 Script executed:
git ls-files | grep -i test | grep -i eslint | head -20Repository: biomejs/biome
Length of output: 2011
🏁 Script executed:
rg -n 'typescript-sort-keys' crates/biome_cli/tests/commands/migrate_eslint.rsRepository: biomejs/biome
Length of output: 39
🏁 Script executed:
rg -n 'typescript-sort-keys' crates/biome_cli/tests/snapshots/main_commands_migrate_eslint/Repository: biomejs/biome
Length of output: 39
🏁 Script executed:
cat crates/biome_cli/tests/snapshots/main_commands_migrate_eslint/migrate_eslintrcjson.snap | head -50Repository: biomejs/biome
Length of output: 1172
Add a migration snapshot test for typescript-sort-keys
Line 405 correctly wires the new source mapping, but there's no snapshot test confirming that typescript-sort-keys/<rule> resolves through this branch. Per coding guidelines, all Rust changes need appropriate tests—a migration snapshot covering this rule would catch regressions.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@crates/biome_cli/src/execute/migrate/eslint_to_biome.rs` at line 405, Add a
migration snapshot test that asserts the new mapping for "typescript-sort-keys"
resolves to RuleSource::EslintTypescriptSortKeys; locate the existing migration
snapshot test suite for the eslint_to_biome migration (look for tests that use
the migration runner or snapshot helpers) and add a case that imports a rule
path like "typescript-sort-keys/<rule>" and captures the resulting resolved
mapping, then add the expected snapshot (or update the snapshot generator) so CI
will verify that typescript-sort-keys routes through the new branch.
Summary
Added another rule source
As it's inspired, it will not include an eslint migration path, so mainly just docs and thus no changeset needed
Test Plan
Docs