0.1.0 • Published 10 years ago
eslint-plugin-tcomb v0.1.0
eslint-plugin-tcomb
A set of ESLint rules for tcomb
Installation
You'll first need to install ESLint:
$ npm i eslint --save-devNext, install eslint-plugin-tcomb:
$ npm install eslint-plugin-tcomb --save-devNote: 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:
0.1.0
10 years ago