Skip to content

Latest commit

History

History
44 lines (30 loc) 路 1.35 KB

README.md

File metadata and controls

44 lines (30 loc) 路 1.35 KB

1_primary_logo_on_transparent_295x65

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

screen shot 2017-09-19 at 00 24 42

Let's assume you are already using ESLint.

  1. Install eslint-plugin-no-shit into your dev dependencies:
$ npm install eslint-plugin-no-shit --save-dev
  1. Add no-shit to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:
{
    "plugins": [
        "no-shit"
    ]
}
  1. Add 'be-polite' rule to the rules section. If you intend to use the plugin at work pass nsfw: true option 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