no-named-default
Added in v0.9.4Configuration
rslint.config.ts
Rule Details
Require default import syntax when importing a default export. Named imports
such as import { default as foo } from './foo.js' are reported on the local
binding foo. Quoted 'default' imports are also reported.
Examples of incorrect code for this rule:
Examples of correct code for this rule:
Inline type imports are ignored. Following upstream behavior, a declaration-level
import type { default as Foo } is still reported; use import type Foo instead.
Options
This rule has no options and provides no automatic fixes or suggestions.
Differences from upstream
Compared with eslint-plugin-import v2.32.0:
- Flow
typeofimports are unsupported. JavaScript and TypeScript imports are supported, but Flow code such asimport { typeof default as Foo } from './foo.js'cannot be checked with rslint. Upstream accepts and ignores this syntax. Use ESLint for files that contain these Flow imports.