Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

eslint-plugin-barrel-files

thepassle152.9kMIT3.0.1

eslint plugin to avoid common errors with barrel files

eslint, eslintplugin, eslint-plugin, barrel, barrelfiles

readme

eslint-plugin-barrel-files

Barrel files are files that just re-export a bunch of things from other files. If you're using a bundler, bundlers usually apply treeshaking and dead code elimination algorithms to remove any unused code.

In many environments however, like test runners, browsers, CDN environments or server side JavaScript runtimes, treeshaking does not get applied. This means that lots of modules get loaded unnecessarily, which can cause significant performance slowdowns.

For more information, I recommend reading Speeding up the JavaScript ecosystem - The barrel file debacle

Supported Rules

changelog

Change Log

This project follows Semantic Versioning (aka SemVer). Visit http://semver.org/ to learn more about it.

Release 3.0.0 (2025-02-13)

  • Actually export the plugin

Release 3.0.0 (2025-02-13)

  • Migrate to ESM and flatconfig format

Release 1.0.0 (2024-01-05)