import-js/eslint-plugin-import

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

Aberta

#1.937 aberto em 5 de nov. de 2020

 (0 comentário) (0 reação) (0 responsável)JavaScript (1.549 forks)batch import
bugflowhelp wanted

Métricas do repositório

Stars
 (5.940 estrelas)
Métricas de merge de PR
 (Mesclagem média 138d 22h) (3 fundiu PRs em 30d)

Description

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

Guia do colaborador