maxmalov / flow-lint-coverage

Asserts the given file against specified coverage threshold

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

flow-lint-coverage Build Status Greenkeeper badge

Simple utility to check whether flow coverage of a single javascript file satisfies the specified threshold

Installation

npm install maxmalov/flow-lint-coverage

Usage

npx flow-lint-coverage -i ./foo.js -t 80 -f ./node_modules/.bin/flow

See npx flow-lint-coverage --help for detailed help.

Lint staged example

This tool is designed mostly for lint-staged integration. This will prevent you from committing files with low flow coverage:

{
  "lint-staged": {
    "*.js": [
      "flow-lint-coverage -t 85 -f ./node_modules/.bin/flow -i"
    ]
  }
}

About

Asserts the given file against specified coverage threshold


Languages

Language:JavaScript 100.0%