πΌ This rule is enabled in the following configs: β
recommended, βοΈ unopinionated.
π‘ This rule is manually fixable by editor suggestions.
Naming default exports improves codebase searchability by ensuring consistent identifier use for a module's default export, both where it's declared and where it's imported.
// β
export default class {}
// β
export default class Foo {}// β
export default function () {}
// β
export default function foo () {}// β
export default () => {};
// β
const foo = () => {};
export default foo;// β
module.exports = class {};
// β
module.exports = class Foo {};// β
module.exports = function () {};
// β
module.exports = function foo () {};// β
module.exports = () => {};
// β
const foo = () => {};
module.exports = foo;