Skip to content

noReExportAll (since v1.6.0)

Diagnostic Category: lint/performance/noReExportAll

Sources:

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";
performance/noReExportAll.js:1:8 lint/performance/noReExportAll ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

   Do not use export all ( export * from ... ).
  
  > 1 │ export * from "foo";
          ^^^^^^^^^^^^^
    2 │ 
  
   Use named export instead.
  
export * as foo from "foo";
performance/noReExportAll.js:1:8 lint/performance/noReExportAll ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

   Do not use export all ( export * from ... ).
  
  > 1 │ export * as foo from "foo";
          ^^^^^^^^^^^^^^^^^^^^
    2 │ 
  
   Use named export instead.
  
export { foo } from "foo";
export type * from "foo";
export type * as bar from "bar";