node package manager
It’s your turn. Help us improve JavaScript. Take the 2017 JavaScript Ecosystem Survey »



Add jscs as mocha test in your test suite.

Version Travis CI Quality Coverage Dependencies Gitter


npm install mocha-jscs --save-dev

Make sure you have a jscs config defined using either:

  • a .jscs.json file in your project root
  • or jscs options in your package.json

In your config you should use one of the available presets or for more advanced configurations, define your own set of rules.

Next, add this to test/index.js in your project, with the following content:


You can also config the paths to run against:

require("mocha-jscs")(["./lib"]); // Array of paths 

That's it! You are done.


devDependency Status

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request