Socket
Socket
Sign inDemoInstall

grunt-solemn

Package Overview
Dependencies
16
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    grunt-solemn

A grunt task for detecting inappropriate language in your code.


Version published
Maintainers
1
Install size
2.55 MB
Created

Readme

Source

grunt-solemn

A grunt task for detecting inappropriate language in your code.

Getting Started

This plugin requires Grunt ~0.4.5

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-solemn --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-solemn');

The "solemn" task

Overview

In your project's Gruntfile, add a section named solemn to the data object passed into grunt.initConfig().

grunt.initConfig({
  solemn: {
    options: {
    },
    files: {
      'css': ['styles/*.css'],
      'js': ['scripts/*.js']
    },
  },
});

Options

options.dictionaries

Type: array Default value: []

An array value that includes a list of paths for custom dictionaries. Each dictionary is a JSON file with the following format:

{
  "word1": ["category1", "category3"],
  "word2": ["category2"],
  "word3": ["category1"]
  "word4": ["category2", "category3", "category4"]
}

Every word must have at least one category. If multiple dictionaries are specified, words and their categories are merged.

options.exitOnViolation

Type: Boolean Default value: false

A boolean value that is used to determine if grunt should exit if it finds a violation.

Usage Examples

Default Options
grunt.initConfig({
  solemn: {
    options: {},
    files: {
      'css': ['styles/*.css'],
      'js': ['scripts/*.js']
    },
  },
});
Custom Options
grunt.initConfig({
  solemn: {
    options: {
      exitOnViolation: true,
      dictionaries: ['dictionary1.json', 'dictionary2.json']
    },
    files: {
      'css': ['styles/*.css'],
      'js': ['scripts/*.js']
    },
  },
});

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.

Release History

(Nothing yet)

Keywords

FAQs

Last updated on 27 Jun 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc