src/content/docs/linter/rules/no-re-export-all.mdx
import { Tabs, TabItem } from '@astrojs/starlight/components';
<Tabs> <TabItem label="JavaScript (and super languages)" icon="seti:javascript"> ## Summary - Rule available since: `v1.6.0` - Diagnostic Category: [`lint/performance/noReExportAll`](/reference/diagnostics#diagnostic-category) - This rule isn't recommended, so you need to enable it. - This rule doesn't have a fix. - The default severity of this rule is [**warning**](/reference/diagnostics#warning). - Sources: - Same as [`barrel-files/avoid-re-export-all`](https://github.com/thepassle/eslint-plugin-barrel-files/blob/main/docs/rules/avoid-re-export-all.md){
"linter": {
"rules": {
"performance": {
"noReExportAll": "error"
}
}
}
}
Avoid re-export all.
Deeply nested import chains in modular projects, where a barrel file imports another barrel file, can lead to increased load times and complexity. This structure results in the unnecessary loading of many modules, significantly impacting performance in large-scale applications. Additionally, it complicates the codebase, making it difficult to navigate and understand the project's dependency graph.
export * from "foo";
export * as foo from "foo";
export { foo } from "foo";
export type * from "foo";
export type * as bar from "bar";