Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thepassle/eslint-plugin-barrel-files
https://github.com/thepassle/eslint-plugin-barrel-files
Last synced: about 7 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/thepassle/eslint-plugin-barrel-files
- Owner: thepassle
- License: mit
- Created: 2024-01-28T15:21:51.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-08-16T13:41:19.000Z (3 months ago)
- Last Synced: 2024-10-30T02:37:34.138Z (14 days ago)
- Language: JavaScript
- Size: 94.7 KB
- Stars: 112
- Watchers: 6
- Forks: 7
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
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](https://marvinh.dev/blog/speeding-up-javascript-ecosystem-part-7/)
## Supported Rules
- [barrel-files/avoid-barrel-files](./docs/rules/avoid-barrel-files.md)
- [barrel-files/avoid-importing-barrel-files](./docs/rules/avoid-importing-barrel-files.md)
- [barrel-files/avoid-namespace-import](./docs/rules/avoid-namespace-import.md)
- [barrel-files/avoid-re-export-all](./docs/rules/avoid-re-export-all.md)