Tool for bumping flow static type check coverage threshold value in package.json
npm install @vroskus/bump-flow-coverage-thresholdTool for bumping flow static type check coverage threshold value in package.json.
Call:
npm install -D @vroskus/bump-flow-coverage-threshold
yarn add -D @vroskus/bump-flow-coverage-threshold
1. Make sure that you have run flow-coverage-report and it has generated a "json" type report into coverage output directory. Here is a configuration example:
``json`
// package.json
...
"flow-coverage-report": {
"threshold": 10,
"outputDir": "coverage",
"reportTypes": [
"json"
]
},
...
3. Call bump-flow-coverage-threshold after running flow check, for example:
`json``
// package.json
...
"scripts": {
"flow": "flow-coverage-report",
"postflow": "bump-flow-coverage-threshold"
}
...
When the tool is called, it finds coverage information, compares new value with the stored threshold value in the package.json, and updates it if the new value is greater then the stored one.