eslint-plugin-tcomb
v0.1.0
Published
A set of ESLint rules for tcomb
Downloads
9
Readme
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
no-loose-structs
: disallow loose structsno-unnamed-types
: disallow types without names
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: