Environment
- Biome CLI version: 2.3.11
- OS: macOS Darwin 25.2.0 (Apple Silicon)
- Node.js: v22.x
Description
Running biome check --write --unsafe causes Biome to hang indefinitely when the useConsistentTypeDefinitions rule is enabled and there are files with empty type aliases like type Foo = {}.
The issue does NOT occur with:
biome check (without flags) - works fine
biome check --write (without --unsafe) - works fine
Only --unsafe flag causes the hang.
Minimal Reproduction
test.tsx:
type EmptyProps = {}
function Component({}: EmptyProps) {
return <div>test</div>
}
biome.json:
{
"$schema": "https://biomejs.dev/schemas/2.3.11/schema.json",
"linter": {
"enabled": true,
"rules": {
"style": {
"useConsistentTypeDefinitions": "error"
}
}
}
}
Command:
biome check --write --unsafe test.tsx
# Hangs indefinitely
Expected Behavior
Biome should apply the unsafe fix (converting type to interface or vice versa) and exit.
Actual Behavior
Biome hangs indefinitely, consuming CPU. The process never exits and must be killed manually.
Workaround
Disable the useConsistentTypeDefinitions rule:
{
"linter": {
"rules": {
"style": {
"useConsistentTypeDefinitions": "off"
}
}
}
}
Related Issues
Environment
Description
Running
biome check --write --unsafecauses Biome to hang indefinitely when theuseConsistentTypeDefinitionsrule is enabled and there are files with empty type aliases liketype Foo = {}.The issue does NOT occur with:
biome check(without flags) - works finebiome check --write(without--unsafe) - works fineOnly
--unsafeflag causes the hang.Minimal Reproduction
test.tsx:
biome.json:
{ "$schema": "https://biomejs.dev/schemas/2.3.11/schema.json", "linter": { "enabled": true, "rules": { "style": { "useConsistentTypeDefinitions": "error" } } } }Command:
biome check --write --unsafe test.tsx # Hangs indefinitelyExpected Behavior
Biome should apply the unsafe fix (converting
typetointerfaceor vice versa) and exit.Actual Behavior
Biome hangs indefinitely, consuming CPU. The process never exits and must be killed manually.
Workaround
Disable the
useConsistentTypeDefinitionsrule:{ "linter": { "rules": { "style": { "useConsistentTypeDefinitions": "off" } } } }Related Issues