0.2.0 • Published 10 years ago
eslint-plugin-if-in-test v0.2.0
eslint-plugin-if-in-test
Find if statement in test code. if is usually typo of mocha's it.

- https://github.com/shokai/eslint-plugin-if-in-test
- https://npmjs.com/package/eslint-plugin-if-in-test
Installation
You'll first need to install ESLint:
$ npm i eslint --save-devNext, install eslint-plugin-if-in-test:
$ npm install eslint-plugin-if-in-test --save-devNote: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-if-in-test globally.
Usage
Add if-in-test to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:
{
"plugins": [
"if-in-test"
]
}Then configure the rules you want to use under the rules section.
{
"rules": {
"if-in-test/if": [1, { "directory": "test" }]
}
}Also you can set multiple directories.
{
"rules": {
"if-in-test/if": [1, { "directory": ["test", "packages/*/test"] }]
}
}Supported Rules
- if
- find
ifstatement [1, {"directory": "test"}]- warnifstatement intest/directory.
- find