Skip to content

Commit

Permalink
flow [nfc]: Better indicate flow bugs in a few suppressions.
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbobbe committed Jan 27, 2021
1 parent 26f66f7 commit d2d8630
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
18 changes: 9 additions & 9 deletions src/boot/replaceRevive.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,25 +57,25 @@ function replacer(key, value) {

switch (Object.getPrototypeOf(origValue)) {
// Flow bug: https://github.com/facebook/flow/issues/6110
case (ZulipVersion.prototype: $FlowFixMe):
case (ZulipVersion.prototype: $FlowIssue):
return { data: value.raw(), [SERIALIZED_TYPE_FIELD_NAME]: 'ZulipVersion' };
case (URL.prototype: $FlowFixMe):
case (URL.prototype: $FlowIssue):
return { data: origValue.toString(), [SERIALIZED_TYPE_FIELD_NAME]: 'URL' };
case (GravatarURL.prototype: $FlowFixMe):
case (GravatarURL.prototype: $FlowIssue):
return { data: GravatarURL.serialize(value), [SERIALIZED_TYPE_FIELD_NAME]: 'GravatarURL' };
case (UploadedAvatarURL.prototype: $FlowFixMe):
case (UploadedAvatarURL.prototype: $FlowIssue):
return {
data: UploadedAvatarURL.serialize(value),
[SERIALIZED_TYPE_FIELD_NAME]: 'UploadedAvatarURL',
};
case (FallbackAvatarURL.prototype: $FlowFixMe):
case (FallbackAvatarURL.prototype: $FlowIssue):
return {
data: FallbackAvatarURL.serialize(value),
[SERIALIZED_TYPE_FIELD_NAME]: 'FallbackAvatarURL',
};
case (Immutable.List.prototype: $FlowFixMe):
case (Immutable.List.prototype: $FlowIssue):
return { data: value, [SERIALIZED_TYPE_FIELD_NAME]: 'ImmutableList' };
case (Immutable.Map.prototype: $FlowFixMe): {
case (Immutable.Map.prototype: $FlowIssue): {
const firstKey = origValue.keySeq().first();
return {
data: value,
Expand Down Expand Up @@ -109,8 +109,8 @@ function replacer(key, value) {
const origValuePrototype = Object.getPrototypeOf(origValue);
invariant(
// Flow bug: https://github.com/facebook/flow/issues/6110
origValuePrototype === (Object.prototype: $FlowFixMe)
|| origValuePrototype === (Array.prototype: $FlowFixMe),
origValuePrototype === (Object.prototype: $FlowIssue)
|| origValuePrototype === (Array.prototype: $FlowIssue),
'unexpected class',
);

Expand Down
4 changes: 2 additions & 2 deletions src/presence/presenceReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ export default (state: PresenceState = initialState, action: Action): PresenceSt
...state[action.email],
// Flow bug (unresolved):
// https://github.com/facebook/flow/issues/8276
// $FlowFixMe
// $FlowIssue #8276
...action.presence,
aggregated: getAggregatedPresence({
...state[action.email],
// Flow bug (unresolved):
// https://github.com/facebook/flow/issues/8276
// $FlowFixMe
// $FlowIssue #8276
...action.presence,
}),
},
Expand Down
2 changes: 1 addition & 1 deletion src/webview/html/template.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import escape from 'lodash.escape';
* template`Hello $\!${&<world}` -> 'Hello $!&amp;&lt;world'
*/
export default (strings: string[], ...values: Array<string | number>) => {
// $FlowFixMe[prop-missing] github.com/facebook/flow/issues/2616
// $FlowIssue #2616 github.com/facebook/flow/issues/2616
const raw: string[] = strings.raw; // eslint-disable-line prefer-destructuring
const result = [];
values.forEach((value, i) => {
Expand Down

0 comments on commit d2d8630

Please sign in to comment.