Skip to content

oxc/no-barrel-file Restriction

What it does

Disallow the use of barrel files where the file contains export * statements, and the total number of modules exceed a threshold.

The default threshold is 100;

References:

Example

Invalid:

javascript
export * from "foo"; // where `foo` loads a subtree of 100 modules
import * as ns from "foo"; // where `foo` loads a subtree of 100 modules

Valid:

javascript
export { foo } from "foo";

References

Released under the MIT License.