Skip to content

noUnresolvedImports

Warn when importing non-existing exports.

Importing a non-existing export is an error at runtime or build time. Biome can detect such incorrect imports and report errors for them.

Note that if you use TypeScript, you probably don’t want to use this rule, since TypeScript already performs such checks for you.

  • This rule does not validate imports through dynamic import() expressions or CommonJS require() calls.

foo.js

export function foo() {};

bar.js

// Attempt to import symbol with a typo:
import { fooo } from "./foo.js";

bar.js

// Fixed typo:
import { foo } from "./foo.js";
biome.json
{
"linter": {
"rules": {
"nursery": {
"noUnresolvedImports": "error"
}
}
}
}