1.0.7 • Published 5 years ago
eslint-plugin-detect-bad-words v1.0.7
eslint-plugin-detect-bad-words
Detect bad/profanity words in code
Uses badwords under the hood

Installation
You'll first need to install ESLint:
Next, install eslint-plugin-detect-bad-words:
npm
$ npm install eslint-plugin-detect-bad-words --save-devyarn
$ yarn add eslint-plugin-detect-bad-words --devUsage
Add detect-bad-words to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:
{
"plugins": ["detect-bad-words"]
}Then configure the rules you want to use under the rules section.
{
"rules": {
"detect-bad-words/in-code": "error",
"detect-bad-words/in-comment": "error"
}
}Optional
You can define custom bad words under settings section.
{
"settings": {
"customBadWords": ["wtf", "fck", "sht"]
}
}License
MIT