unicorn/prefer-export-from
eslint-plugin-unicorn
Safe autofix
eslint.config.js
import unicorn from "eslint-plugin-unicorn";
export default [
{
plugins: { unicorn },
rules: {
"unicorn/prefer-export-from": "error",
},
},
];import defaultExport from './foo.js';
export default defaultExport;import {named} from './foo.js';
export {named};import * as namespace from './foo.js';
export {namespace};export {default} from './foo.js';export {named} from './foo.js';export * as namespace from './foo.js';Examples from the ESLint documentation.
unicorn/prefer-export-from
eslint-plugin-unicorn
import unicorn from "eslint-plugin-unicorn";
export default [
{
plugins: { unicorn },
rules: {
"unicorn/prefer-export-from": "error",
},
},
];unicorn/prefer-export-from
unicorn plugin · style
{
"rules": {
"unicorn/prefer-export-from": "error"
}
}Biome does not have this rule.
Disallow confusing uses of Array#with().
Prefer the spread operator over Array.from(…), Array#concat(…), Array#{slice,toSpliced}(), and trivial for…of copies.
Disallow member access from await expression.
Enforce consistent brace style for case clauses.
Disallow Array#reduce() and Array#reduceRight().
Enforce consistent break/return/continue/throw position in case clauses.