-
-
Notifications
You must be signed in to change notification settings - Fork 32
Update to use --json-version=2 #119
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
Conversation
.eslintrc
Outdated
"prettier" | ||
], | ||
"rules": { | ||
"consistent-return": "off", | ||
"flowtype/define-flow-type", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The CI test is failing because of this one: https://travis-ci.org/amilajack/eslint-plugin-flowtype-errors/jobs/346625539#L502
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops, must have hit backspace without realizing. Fixed now.
252af96
to
058a387
Compare
058a387
to
fcfa159
Compare
Published this as |
Getting the following error:
|
There are some cases where the
|
@amilajack Could you post some code that will produce this error? |
// @flow
type foo = {} & ({ a: Array<string> } | { b: string });
class bar {
foo(a: foo) {
if ('b' in a) {
a.foo.map(e => e(e))
}
}
} |
@nwoltman I think you just missed this type Message = MessageInline | MessageBlock;
type MessageBlock = MessageUnorderedList;
type MessageUnorderedList = {
kind: 'UnorderedList',
message: MessageInline,
items: Array<Message>,
}; That explains why the message might be an object. |
I think it's easier if you just copy the types from facebook's commit message, to our code. That way, we won't forget anything. |
@jdmota Thanks for pointing out that commit! I'll get to it tomorrow. |
The new JSON format is much more consistent and has fewer oddities than the old format.