-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
import/prefer-default-export should ignore type for flowtype #484
Comments
Yeah, that should be fine. Would love someone with Flow experience to submit a PR, I'm not familiar enough with it to confidently work this in. |
@benmosher I don't think you need flow experience. Just ignore Or maybe a regexp to ignore? |
* Ignoring flow type exports, resolve #484 * Added test and note to CHANGELOG
The following file is generating a warning that default export should be used.
/* @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 } Shouldn't it be consistent? |
Yes; please file a new issue for that one. |
I have a file with this:
I get this error:
app/bundles/comments/types/index.js
2:1 error Prefer default export import/prefer-default-export
See doc note:
I just checked and
export default type
is not supported in 0.27.Any chance of ignoring
export type
as an option to this rule?The text was updated successfully, but these errors were encountered: