Flow: Errors suppress doesn't work

Created on 16 Jun 2020  路  1Comment  路  Source: facebook/flow

After update to the latest Flow version, I got that suppress_comment is unsupported.

鈺扳攢 y flow
yarn run v1.22.4
$ flow
.flowconfig:24 Unsupported option specified! (suppress_comment)
error Command failed with exit code 8.

And my .flowconfig

[ignore]
<PROJECT_ROOT>/node_modules/.*
<PROJECT_ROOT>/build/.*
<PROJECT_ROOT>/coverage/.*
<PROJECT_ROOT>/flow-typed/custom/.*

[include]

[libs]
flow-typed/

[lints]
all=error

[options]
module.file_ext=.js

module.system=haste

module.system.node.resolve_dirname=node_modules
module.name_mapper='.+\(.s?css\)' -> 'CSSModule'
module.name_mapper='.+\(.svg\)' -> 'SvgModule'

suppress_comment= \\(.\\|\n\\)*\\$FlowFixMe
suppress_comment= \\(.\\|\n\\)*\\$FlowSuppressError

[strict]
nonstrict-import
unclear-type
unsafe-getters-setters
untyped-import
untyped-type-import

Flow version: 0.127.0
Node: 14.4
Yarn: 1.22.4

Expected behavior

I want to suppress errors on some lines at the code.

Actual behavior

Flow failure with error

bug needs triage

Most helpful comment

Remove suppress_comment from your .flowconfig.

The different error suppressors are standardized now and not configurable: https://medium.com/flow-type/making-flow-error-suppressions-more-specific-280aa4e3c95c

The standard ones are: $FlowFixMe, $FlowIgnore, $FlowIssue, $FlowExpectedError. You can use sed to search/replace $FlowSuppressError to $FlowIgnore

>All comments

Remove suppress_comment from your .flowconfig.

The different error suppressors are standardized now and not configurable: https://medium.com/flow-type/making-flow-error-suppressions-more-specific-280aa4e3c95c

The standard ones are: $FlowFixMe, $FlowIgnore, $FlowIssue, $FlowExpectedError. You can use sed to search/replace $FlowSuppressError to $FlowIgnore

Was this page helpful?
0 / 5 - 0 ratings