1.0.1 • Published 5 years ago
eslint-plugin-no-instanceof v1.0.1
eslint-plugin-no-instanceof
Disallows use of instanceof operator, useful in TS envs where code relies purely on structural typing (i.e. static typing based on presence of attributes)
Installation
You'll first need to install ESLint:
$ npm i eslint --save-devNext, install eslint-plugin-no-instanceof:
$ npm install eslint-plugin-no-instanceof --save-devUsage
Add no-instanceof to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:
{
"plugins": [
"no-instanceof"
]
}Then configure the rules you want to use under the rules section.
{
"rules": {
"no-instanceof/no-instanceof": 2
}
}Supported Rules
no-instanceof