0.1.0 • Published 9 years ago

eslint-plugin-tcomb v0.1.0

Weekly downloads
-
License
ISC
Repository
-
Last release
9 years ago

Build Status

eslint-plugin-tcomb

A set of ESLint rules for tcomb

Installation

You'll first need to install ESLint:

$ npm i eslint --save-dev

Next, install eslint-plugin-tcomb:

$ npm install eslint-plugin-tcomb --save-dev

Note: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-tcomb globally.

Usage

Add tcomb to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
    "plugins": [
        "tcomb"
    ]
}

Then configure the rules you want to use under the rules section.

{
    "rules": {
        "tcomb/rule-name": 2
    }
}

Supported Rules

Recommended configuration

This plugin exports a recommended configuration that enforce a disciplined tcomb use.

To enable this configuration use the extends property in your .eslintrc config file:

{
  "plugins": [
    "tcomb"
  ],
  "extends": ["eslint:recommended", "plugin:tcomb/recommended"]
}

See ESLint documentation for more information about extending configuration files.

The rules enabled in this configuration are: