Socket
Socket
Sign inDemoInstall

danger-plugin-flow-typed

Package Overview
Dependencies
207
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    danger-plugin-flow-typed

Ensure all new JS files in a project are flow typed


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Install size
16.3 MB
Created
Weekly downloads
 

Readme

Source

danger-plugin-flow

Build Status npm version

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

Usage

Install:

yarn add danger-plugin-flow --dev

At a glance:

// dangerfile.js
import { schedule } from 'danger'
import flow from 'danger-plugin-flow'

schedule(flow());

Options

Recommended setup:

schedule(flow({
  modified: "warn",
  created: "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:

schedule(flow({
  blacklist: ['dist/**/*.js']
}))
created

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

schedule(flow({
  created: "warn"
}))

schedule(flow({
  created: "fail"
}))

schedule(flow({
  created: false
}))
modified

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

schedule(flow({
  modified: "warn"
}))

schedule(flow({
  modified: "fail"
}))

schedule(flow({
  modified: false
}))

Changelog

See the GitHub release history.

Contributing

See CONTRIBUTING.md.

Keywords

FAQs

Last updated on 27 May 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc