ESLint plugin to detect barrel files (re-export aggregators) and imports from them, preventing unnecessary module loading in non-bundler environments. Current stable version 3.0.1. Release cadence is irregular; last major v3 dropped support for older ESLint versions. Differentiator: specifically targets barrel file patterns that cause performance issues in test runners, browsers, CDNs, and server-side runtimes where tree-shaking is absent. Alternatives like eslint-plugin-import have broader scope but don't focus on barrel files specifically.
Verified import paths — ran on the pinned version, not inferred.
Default export is the plugin object; in ESLint flat config, use import plugin from 'eslint-plugin-barrel-files' and spread plugin.configs.recommended.
In ESLint flat config (>=9), use the recommended config exported by the plugin. For legacy .eslintrc, use plugins: ['barrel-files'].
Rule names must be prefixed with 'barrel-files/' because the plugin is namespaced.
Shows how to configure eslint-plugin-barrel-files in ESLint flat config (recommended) and legacy .eslintrc format.
Breaking-change detection hasn't run for this library yet.
CVE tracking and dependency tree are planned for a later release.