grunt-profanities
Grunt task for checking the use of profanities in your code
Getting Started
This plugin requires Grunt ~0.4.1
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-profanities --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt;
The "profanities" task
Overview
In your project's Gruntfile, add a section named profanities
to the data object passed into grunt.initConfig()
.
grunt
Options
languages: An array of languages. Defaults to 'en'. When different languages are used the profanities list will be read from lib/profanities/#{language}.json file. Refer to en.json for an example.
ignoreWords: An array of profanities to ignore if found on the files.
Usage Examples
Default Options
// bad_comment.js // This crap always work{ ;};
// Gruntfile.js grunt
Custom Options
// spanis_profanity.js { ;};
// Gruntfile.js grunt
TO DO
- Show file and line where the profanity was discovered
ZOMG Fork! Thank you!
You're welcome to fork this project and send pull requests. Please run grunt
to make sure all file have lint check.
Copyright (c) 2013 Gabriel Cebrian, released under the MIT license. Original profanity list copied from https://github.com/web-mech/badwords