withspectrum/danger-plugin-flow

Name: danger-plugin-flow

Owner: Spectrum

Description: Ensure all JS files that get touched in a PR are flow typed

Created: 2018-03-14 13:01:59.0

Updated: 2018-05-01 05:15:10.0

Pushed: 2018-03-19 16:38:00.0

Homepage: null

Size: 75

Language: TypeScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

danger-plugin-flow

Build Status npm version

Ensure all new .js files in a project are flow typed

Usage

Install:

 add danger-plugin-flow --dev

At a glance:

angerfile.js
rt { schedule } from 'danger'
rt flow from 'danger-plugin-flow'

dule(flow());
Options

Recommended setup:

dule(flow({
dified: "warn",
eated: "fail"

This will fail the build for any newly introduced file that isn't flow typed, but will only warn the developer if they touch a file that's not flow typed. This is what we use because it can be hard to type legacy code, but we want to ensure every newly incoming code is properly typed.

blacklist

Blacklist certain globs from being checked:

dule(flow({
acklist: ['dist/**/*.js']

created

Decide whether you want to warn, fail or ignore newly created files that are untyped:

dule(flow({
eated: "warn"


dule(flow({
eated: "fail"


dule(flow({
eated: false

modified

Decide whether you want to warn, fail or ignore modified files that are untyped:

dule(flow({
dified: "warn"


dule(flow({
dified: "fail"


dule(flow({
dified: false

Changelog

See the GitHub release history.

Contributing

See CONTRIBUTING.md.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.