3

Is there any way to forbid bulk exports in eslint? I want to forbid these exports:

export * from './module-name';

Can't find appropriate eslint rule.

1 Answer 1

4

Solution has been found! We need to use the following eslint rule:

{
  "rules": {
    "no-restricted-syntax": ["error", "ExportAllDeclaration"]
  }
}

More details you can find at eslint docs. All available values for the no-restricted-syntax rule can be found here.

Not the answer you're looking for? Browse other questions tagged or ask your own question.