import-js/eslint-plugin-import

Inconsistent import/prefer-default-export with Flow type

開放

#1,164 建立於 2018年8月23日

 (0 則留言) (0 個反應) (0 位負責人)JavaScript (1,548 個分叉)batch import
bugflowhelp wanted

倉庫指標

星標
 (5,940 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

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.

貢獻者指南