Skip to content

Latest commit

 

History

History
30 lines (23 loc) · 461 Bytes

avoid-barrel-files.md

File metadata and controls

30 lines (23 loc) · 461 Bytes

Avoid barrel files

Rule Details

This rule disallows authoring barrel files in your project.

Examples of incorrect code for this rule:

export { foo } from 'foo';
export { bar } from 'bar';
export { baz } from 'baz';

Configuration

This rule takes an optional configuration:

{
  "rules": {
    "barrel-files/avoid-barrel-files": [
      2,
      {
        "amountOfExportsToConsiderModuleAsBarrel": 5
      }
    ]
  }
}