default
Added in v0.6.5Configuration
rslint.config.ts
Rule Details
This rule reports a default import when the imported module does not provide a default export.
Examples of incorrect code for this rule:
Examples of correct code for this rule:
Modules that cannot be resolved, are ignored, or are not ES modules are not reported by this rule.
Differences from upstream
esModuleInteropdoes not supply a missing ES module default. Givenexport const value = 1invalues.mjs, rslint reportsimport value from './values.mjs'even withesModuleInterop: true; upstream v2.32.0 allows it. Import{ value }or add a default export. With NodeNext, native ES imports of CommonJS modules still receivemodule.exportsas their default, regardless of the interop setting.