profile
viewpoint

Ask questionsFlow 0.127.0 broke $FlowFixMe

<!-- Please fill out this entire template so that we can address your bug report as quickly as possible.

Any bug reports that don't contain instructions to reproduce the issue will be closed. -->

Flow version: 0.127.0

Expected behavior

$FlowFixMe anywhere in a comment suppresses type checker errors on the following line.

Actual behavior

$FlowFixMe in a comment suppresses errors only if $FlowFixMe is the only text in that comment.

Repro

<!-- Please reproduce your issue on flow.org/try so that we can debug it.

Not all issues are reproducible on try-flow because they may require multiple files or specific flowconfig settings. If your bug can only be reproduced under one of these constraints, please make a small github repo that contains a minimal way to reproduce your problem. -->

  • Link to Try-Flow or Github repo: https://gist.github.com/strager/2184cf46de7c5df7b47a628f05cd4931

In the following example, Flow version 0.126.0 reports no errors (because all errors are suppressed by $FlowFixMe comments), but Flow version 0.127.0 reports an error for the last line (because the comment includes other text in addition to $FlowFixMe):

/* @flow */

function add(x: number, y: number) {
    return x + y;
}

add(2, 2);
// $FlowFixMe
add("hello", "world");
// Testing something. $FlowFixMe
add("hello", "world");
facebook/flow

Answer questions dsainati1

Apparently the docs have never included any info on this as far as I can tell, so I will work on writing something about errors and suppressions in general.

useful!

Related questions

Common spread pattern leads to "exponentially large number of cases" errors hot 1
Flow issue "Please upgrade flow to version >=0.75." hot 1
Object.fromEntries type defs missing hot 1
Cannot set defaultProps with React.memo and React.forwardRef hot 1
Inexact rest object claims it may have properties it can't possibly have hot 1
Inexact rest object claims it may have properties it can't possibly have hot 1
Inexact rest object claims it may have properties it can't possibly have hot 1
0.92.0 release crashes on startup (Unix.Unix_error) hot 1
module.name_mapper does not find nested modules on windows hot 1
Cannot import useState because there is no useState export in react. hot 1
Can't use a default value from a destructuring assignment as a computed property since 0.111 hot 1
Support optional chaining - flow hot 1
Flow issue "Please upgrade flow to version >=0.75." hot 1
Allow explicitly including a folder under an ignored path hot 1
Flow caches and fails to purge errors hot 1
source:https://uonfu.com/
Github User Rank List