Skip to content

Import validation

Toggle: enabledChecks.import ยท Fix: none

Resolves relative and aliased imports against the configured source scope, including supported extensionless paths, index modules, and module forms. Reports unresolved local targets. There is no autofix because choosing the intended replacement is semantic.

Configure sourceRoots, extensions, aliases, externalPrefixes, skippedDirectories, and skippedFiles. An external prefix marks an intentionally external namespace; an alias maps an import prefix to a repository path. Keep exemptions narrow so they do not hide broken local imports.

Before โ€” the relative target does not exist:

import { parseUser } from './users/parseUser.js';

After โ€” point at the actual module (example repository layout: src/user/parse-user.ts):

import { parseUser } from '../user/parse-user.js';