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

mocha-csslint

Package Overview
Dependencies
Maintainers
9
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mocha-csslint

mocha-csslint -------- Run CSSLint as a Mocha test.

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
9
Weekly downloads
 
Created
Source

mocha-csslint npm version Build Status

Run CSSLint as Mocha tests.

To install in your node.js project as devDependency, run this command, in the root of your project

npm install mocha-csslint --save-dev --save-exact

Usage

Mocha defaults to looking for your test specs in the test folder of your project. Add this file as test/csslint.spec.js in your project, with the following content:

require('mocha-csslint')('/client/static/css');

You should point to the place where you keep your css files instead of '/client/static/css' above.

That is it you are done.

You can still specify you csslint options in a .csslintrc file in the root of your project (see this project for an example)

To grep only the CSSLint test, just do

mocha --grep csslint

If you want to run CSSLint on several separate folders you can do:

require('mocha-csslint')(['/client/static/css', '/clinet2/css']);

Why?

This module was created to:

  • Make adding CSSLint testing to a project using Mocha as easy as possible
  • Make it easy to piggyback on all the different Mocha reporters (dot, spec, teamcity etc) for CSSLint output
  • Make sure that you get a click-able link directly to the problem in WebStorm, when CSSLint fails
  • Make sure that there is no unnecessary noise in the test output

Keywords

FAQs

Package last updated on 22 Jun 2018

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