unicorn/no-named-default
eslint-plugin-unicorn
Safe autofix
eslint.config.js
import unicorn from "eslint-plugin-unicorn";
export default [
{
plugins: { unicorn },
rules: {
"unicorn/no-named-default": "error",
},
},
];import {default as foo} from 'foo';import {default as foo, bar} from 'foo';export {foo as default};import foo from 'foo';import foo, {bar} from 'foo';export default foo;Examples from the ESLint documentation.
unicorn/no-named-default
eslint-plugin-unicorn
import unicorn from "eslint-plugin-unicorn";
export default [
{
plugins: { unicorn },
rules: {
"unicorn/no-named-default": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Disallow calling Promise executor resolver functions more than once on the same execution path.
Disallow misrefactored compound assignments where the target is duplicated in the right-hand side.
Disallow non-standard properties on built-in objects.
Disallow invalid implementations of well-known symbol methods.