mirror of
https://github.com/status-im/sourcecred.git
synced 2025-01-10 04:36:25 +00:00
3b3564203c
As of this commit, adding the comment `//$ExpectFlowError` in flow-typed code asserts that the next line must cause a flow error. If it does, no error or warning is generated. If it does not, then this produces a flow warning, which is visible to developers running `yarn flow` and additionally causes travis to fail. Test plan: - As committed, `yarn travis` passes. - I added `//$ExpectFlowError` above some line of flow-checked code which does not currently throw an error. Afterwards, `yarn travis` failed (and a helpful message was displayed in console on running `yarn flow`) - I added the following bad code into one of our files: ```javascript //$ExpectFlowError const foo: string = 3; ``` As expected, `yarn flow` and `yarn travis` both passed.
15 lines
140 B
Plaintext
15 lines
140 B
Plaintext
[ignore]
|
|
|
|
[include]
|
|
|
|
[libs]
|
|
flow-typed
|
|
|
|
[lints]
|
|
|
|
[options]
|
|
suppress_comment=\\(.\\|\n\\)*\\$ExpectFlowError
|
|
include_warnings=true
|
|
|
|
[strict]
|