Socket
Book a DemoInstallSign in
Socket

eslint-config-flowtype-strict

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-config-flowtype-strict

Shareable ESLint config for eslint-plugin-flowtype: recommended + more rules.

0.2.0
latest
Source
npmnpm
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

eslint-config-flowtype-strict

ESLint shareable config for eslint-plugin-flowtype: recommended + more rules.

Latest Stable Version Build Status Greenkeeper

Rules

In addition to plugin:flowtype/recommended, the following rules are in effect:

Examples

Example of valid code:

// @flow

import React, { Component } from "react";

type InputEvent = SyntheticInputEvent<HTMLInputElement>;

type ActivatorProps = {|
  what: string,
  onClick: (event: InputEvent) => void
|};

class Activator extends Component<AppProps, {}> {
  render() {
    const { what, onClick } = this.props;
    return <button onclick={onClick}>Activate {what}</button>;
  }
}

Example of invalid code:

/* @flow */ // <-- flowtype/require-valid-file-annotation

type ActivatorProps = { // <-- flowtype/require-exact-type
  what: string,
  onClick: function, // <-- flowtype/no-weak-types
};

See the full config for more details.

Installation

Prerequisites:

Important: please note ESLint, babel-eslint and eslint-plugin-flowtype need to be installed alongside this module. Latest versions are recommended. This is because this module uses peer dependencies to be more flexible. For Node 4 and 5, use eslint@4 and babel-eslint@8.

npm install --save-dev eslint
npm install --save-dev babel-eslint
npm install --save-dev eslint-plugin-flowtype
npm install --save-dev eslint-config-flowtype-strict

Dependency Status devDependency Status peerDependency Status

Usage

Add this to your .eslintrc.json:

{
  "extends": ["flowtype-strict"]
}

Contributing

Please read guidelines for contributing.

Note: this ESLint config was created using eslint-config-template.

License

License

Keywords

check

FAQs

Package last updated on 24 Dec 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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.