New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

flow-bin-loader

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flow-bin-loader

webpack loader for Flow

  • 1.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7
increased by40%
Maintainers
1
Weekly downloads
 
Created
Source

flow-bin-loader

npm version

A webpack loader built around flow-bin to enforce type checking with Flow.

Installation

$ npm install --save-dev flow-bin flow-bin-loader

Usage

Add the plugin to your webpack config as follows:

module: {
  rules: [
    {
      test: /\.jsx?$/,
      loader: 'flow-bin-loader',
      exclude: /node_modules/,
      enforce: 'pre',
    }
  ]
},

Don't forget to add // @flow to the top of the files you want to be checked.

Configuration

By default, modules are resolved with respect to the directory where .flowconfig lives, so you might need to tell Flow how to map paths to the correct directory.

In order to do that, create a file named .flowconfig in the root directory of your project and add a module mapper rule such as the one below.

[options]
module.name_mapper='^\(.*\)$' -> '<PROJECT_ROOT>/src/\1'

For the complete list of options, visit https://flowtype.org/docs/advanced-configuration.html

Keywords

FAQs

Package last updated on 10 Feb 2018

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc