Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

postcss-solemn

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-solemn

A PostCSS plugin that detects inappropriate language in your CSS.

  • 1.3.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

postcss-solemn

A PostCSS plugin that detects inappropriate language in your CSS code.

Usage


var processors = [
    solemn({
        reportViolations: false,
        callback: function(violations, violationMessages) {
            console.log(violations);
            console.log(violationMessages);
        },
        dictionaries: ['dictionary1.json', 'dictionary2.json']
    })
];

gulp.src('styles/*.css')
    .pipe(postcss(processors));

Options

reportViolations

If true, it prints violation messages to the screen.

callback (optional)

A callback to receive two arrays - an array of violations and an array of corresponding violationMessages. The callback must be in the following form:


function(violations, violationMessages) {
  // do something
}

dictionaries

An array of dictionary files to use for detecting inappropriate language.

Each custom 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 violation category. If multiple dictionaries are specified, words and their categories are merged.

Test

To test the module, run the follow from the command line:


npm test

Keywords

FAQs

Package last updated on 27 Jun 2016

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc