sourcecred/config
Dandelion Mané 3b3564203c
Flow: enable `//$ExpectFlowError` (#315)
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.
2018-05-29 13:56:36 -07:00
..
jest Ensure that flow is used in all js files (#232) 2018-05-07 20:02:19 -07:00
babel.js Upgrade Flow to v0.72.0 (#285) 2018-05-15 17:09:29 -07:00
env.js Turn on flow for config/env.js (#243) 2018-05-08 14:56:06 -07:00
paths.js Proxy Webpack dev server through to an API server (#245) 2018-05-08 16:09:37 -07:00
polyfills.js Ensure that flow is used in all js files (#232) 2018-05-07 20:02:19 -07:00
travis.js Flow: enable `//$ExpectFlowError` (#315) 2018-05-29 13:56:36 -07:00
webpack.config.backend.js Ensure that flow is used in all js files (#232) 2018-05-07 20:02:19 -07:00
webpack.config.dev.js Ensure that flow is used in all js files (#232) 2018-05-07 20:02:19 -07:00
webpack.config.prod.js Ensure that flow is used in all js files (#232) 2018-05-07 20:02:19 -07:00
webpackDevServer.config.js Ensure that flow is used in all js files (#232) 2018-05-07 20:02:19 -07:00