import-js/eslint-plugin-import

Inconsistent import/prefer-default-export with Flow type

Aperta

#1164 aperta il 23 ago 2018

 (0 commenti) (0 reazioni) (0 assegnatari)JavaScript (1549 fork)batch import
bugflowhelp wanted

Metriche repository

Star
 (5940 stelle)
Metriche merge PR
 (Merge medio 138g 22h) (3 PR mergiate in 30 g)

Descrizione

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.

Guida contributor