Path: blob/main/docs/rules/no-named-as-default.md
829 views
import/no-named-as-default
Reports use of an exported name as the locally imported name of a default export.
Rationale: using an exported name as the name of the default export is likely...
misleading: others familiar with
foo.jsprobably expect the name to befooa mistake: only needed to import
barand forgot the brackets (the case that is prompting this)
Rule Details
Given:
...this would be valid:
...and this would be reported:
For post-ES2015 export extensions, this also prevents exporting the default from a referenced module as a name within that module, for the same reasons:
Further Reading
ECMAScript Proposal: export ns from
ECMAScript Proposal: export default from