eslint-plugin-no-shit
eslint-plugin-no-shit copied to clipboard
Disallow ⚠️ use of offensive 💪 language 💯

The plugin will warn ⚠️ you if it finds words like fuck and shit 💪 in your codebase (variable declarations, function declarations and even comments 💯).
If you believe that clean code === code without swearing (even in comments!) you should give this plugin a try.
Usage
Let's assume you are already using ESLint.
- Install
eslint-plugin-no-shitinto your dev dependencies:
$ npm install eslint-plugin-no-shit --save-dev
- Add
no-shitto the plugins section of your.eslintrcconfiguration file. You can omit theeslint-plugin-prefix:
{
"plugins": [
"no-shit"
]
}
- Add 'be-polite' rule to the rules section. If you intend to use the plugin at work pass
nsfw: trueoption in following way:
{
"rules": {
"no-shit/be-polite": ["warn", {"nsfw": true}]
}
}
How
I created this plugin after watching great Frontend Masters "Abstract Syntax Trees" course by @kentcdodds - you can check it out at https://github.com/kentcdodds/asts-workshop/
LICENSE
MIT