1.0.12 • Published 10 months ago
@vroskus/bump-flow-coverage-threshold v1.0.12
@vroskus/bump-flow-coverage-threshold
Tool for bumping flow static type check coverage threshold value in package.json.
Installation
Call:
npm install -D @vroskus/bump-flow-coverage-threshold
yarn add -D @vroskus/bump-flow-coverage-threshold
Usage
- Make sure that you have run flow-coverage-report and it has generated a "json" type report into
coverageoutput directory. Here is a configuration example:
// package.json
...
"flow-coverage-report": {
"threshold": 10,
"outputDir": "coverage",
"reportTypes": [
"json"
]
},
...- Call
bump-flow-coverage-thresholdafter running flow check, for example:
// 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.