import-js/eslint-plugin-import

Inconsistent import/prefer-default-export with Flow type

オープン

#1,164 opened on 2018/08/23

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

Repository metrics

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

説明

The following file is generating a warning that default export should be used.

Prefer default export. (import/prefer-default-export)

/* @flow */

export type AnswerState = {
  foo: string
}

export const answer: AnswerState = {
  foo: ''
}

This one however, is not generating any errors or warnings.

/* @flow */

- export type AnswerState = {
+ type AnswerState = {
  foo: string
}

export const answer: AnswerState = {
  foo: ''
}

+ export type { AnswerState }

Originally posted in #484.

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