Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent import/prefer-default-export with Flow type #1164

Open
rodrigobdz opened this issue Aug 23, 2018 · 0 comments
Open

Inconsistent import/prefer-default-export with Flow type #1164

rodrigobdz opened this issue Aug 23, 2018 · 0 comments

Comments

@rodrigobdz
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants