import-js/eslint-plugin-import

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

オープン

#1,937 opened on 2020/11/05

 (0 件のコメント) (0 件のリアクション) (0 人の担当者)JavaScript (1,549 件のフォーク)batch import
bugflowhelp wanted

Repository metrics

Stars
 (5,940 個のスター)
PR merge metrics
 (平均マージ 138d 22h) (30d で 3 merged PRs)

説明

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

コントリビューターガイド