Aller au contenu

noReExportAll

Ce contenu n’est pas encore disponible dans votre langue.

Diagnostic Category: lint/performance/noReExportAll

Since: v1.6.0 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";
code-block.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";
code-block.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";