@reelay/eslint-plugin-spothero
v0.2.2
Published
SpotHero's custom ESLint plugin and rules.
Downloads
2
Keywords
Readme
@spothero/eslint-plugin-spothero
Custom ESLint rules written by and in use at SpotHero.
Installation
You'll first need to install ESLint:
$ npm install eslint --save-dev
Next, install @spothero/eslint-plugin-spothero
:
$ npm install @spothero/eslint-plugin-spothero --save-dev
Note: If you installed ESLint globally (using the -g
flag) then you must also install @spothero/eslint-plugin-spothero
globally.
Usage
Add @spothero/eslint-plugin-spothero
to the plugins section of your .eslintrc
configuration file:
{
"plugins": [
"@spothero/eslint-plugin-spothero"
]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"@spothero/spothero/rule-name": 2
}
}
Supported Rules
- @spothero/spothero/ternary-parentheses: Require ternary expressions to have condition enclosed by parentheses