import-js/eslint-plugin-import

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

开放

#1,937 创建于 2020年11月5日

 (0 条评论) (0 个反应) (0 位负责人)JavaScript (1,549 个派生)batch import
bugflowhelp wanted

仓库指标

星标
 (5,939 个星标)
PR 合并指标
 (平均合并 138天 22小时) (30 天内合并 3 个 PR)

描述

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

贡献者指南