oxc/no-barrel-file 限制
作用
禁止使用包含 export *
語句的 barrel files,且模組總數超過閾值。
預設閾值為 100;
參考
- https://github.com/thepassle/eslint-plugin-barrel-files
- https://marvinh.dev/blog/speeding-up-javascript-ecosystem-part-7
範例
無效
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
有效
javascript
export { foo } from "foo";