import/export
eslint-plugin-import
No autofixRecommended
eslint.config.js
import importPlugin from "eslint-plugin-import";
export default [
{
plugins: { import: importPlugin },
rules: {
"import/export": "error",
},
},
];let foo;
export { foo }; // Multiple exports of name 'foo'.
export * from "./export-all"; // Conflicts if export-all.js also exports foolet foo;
export { foo as foo1 }; // Renamed export to avoid conflict
export * from "./export-all"; // No conflict if export-all.js also exports fooExamples from the Oxlint documentation.
import/export
eslint-plugin-import
import importPlugin from "eslint-plugin-import";
export default [
{
plugins: { import: importPlugin },
rules: {
"import/export": "error",
},
},
];import/export
import plugin · nursery
{
"plugins": [
"import"
],
"rules": {
"import/export": "error"
}
}Biome does not have this rule.
Forbid use of exported name as identifier of default export.
Forbid use of exported name as property of default export.
Ensure named imports correspond to a named export in the remote file.
Ensure imports point to a file/module that can be resolved.
Forbid repeated import of the same module in multiple places.
Forbid anonymous values as default exports.