This rule raises an issue when using named import or export syntax to handle default values instead of the dedicated default syntax.
JavaScript provides two ways to import and export default values: the dedicated default syntax and the named syntax with explicit
default naming.
The dedicated default syntax (import foo from 'module' and export default foo) is the conventional and recommended
approach because:
Using the named syntax for defaults (import {default as foo} or export {foo as default}) is unnecessarily verbose and can
confuse developers who expect the standard default syntax.
Using non-standard syntax for default imports and exports reduces code readability and consistency. While this doesn’t cause runtime issues, it can slow down code comprehension and make the codebase harder to maintain, especially for teams with varying JavaScript experience levels.
Replace named import of default with dedicated default import syntax.
import {default as foo} from 'module'; // Noncompliant
import foo from 'module';