noReExportAll
此内容尚不支持你的语言。
Diagnostic Category: lint/performance/noReExportAll
Since: v1.6.0
Sources:
- Same as:
barrel-files/avoid-re-export-all
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.
Examples
Section titled ExamplesInvalid
Section titled Invalidcode-block.js:1:8 lint/performance/noReExportAll ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠ Do not use export all ( export * from … ).
> 1 │ export * from “foo”;
│ ^^^^^^^^^^^^^
2 │
ℹ Use named export instead.
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.