import-js/eslint-plugin-import

Re-exporting all flow types can cause trouble with export rule

Offen

#1.937 geöffnet am 05.11.2020

 (0 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)JavaScript (1.549 Forks)batch import
bugflowhelp wanted

Repository-Metriken

Stars
 (5.940 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 138T 22h) (3 gemergte PRs in 30 T)

Beschreibung

file-a.js

// @flow
const Bar = 'Bar';

export {Bar};

file-b.js

// @flow

export {Bar} from './file-a';

export type * from './file-a';

export type * is read by export rule as exporting everything inside file-a.js (not just the types), so it causes:

file-b.js
  3:9  error  Multiple exports of name 'Bar'  import/export
  5:1  error  Multiple exports of name 'Bar'  import/export

Contributor Guide