src/content/docs/linter/rules/no-unresolved-imports.mdx
import { Tabs, TabItem } from '@astrojs/starlight/components';
<Tabs> <TabItem label="JavaScript (and super languages)" icon="seti:javascript"> :::note This rule belongs to the project domain. This means that its activation will activate the Biome Scanner to scan the files of your project. Read more about it in the [documentation page](/linter/domains#project) ::: ## Summary - Rule available since: `v2.0.0` - Diagnostic Category: [`lint/correctness/noUnresolvedImports`](/reference/diagnostics#diagnostic-category) - This rule isn't recommended, so you need to enable it. - This rule doesn't have a fix. - The default severity of this rule is [**error**](/reference/diagnostics#error). - This rule belongs to the following domains: - [`project`](/linter/domains#project) - Sources: - Inspired from [`import/named`](https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/named.md){
"linter": {
"rules": {
"correctness": {
"noUnresolvedImports": "error"
}
}
}
}
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.
import()
expressions or CommonJS require() calls.export function foo() {};
// Attempt to import symbol with a typo:
import { fooo } from "./foo.js";
export function foo() {};
// Fixed typo:
import { foo } from "./foo.js";