Skip to content

Latest commit

 

History

History
53 lines (39 loc) · 1.25 KB

README.md

File metadata and controls

53 lines (39 loc) · 1.25 KB

node-jscs plugin volo tpl Build Status

JSCS plugin volo template

To create empty stub use volo

npm install volo
volo create {place here your plugin name} zxqfox/node-jscs-plugin-tpl

Friendly packages

Plugin installation

jscs-plugin can be installed using npm:

npm install jscs-plugin

To use plugin you should add it to configuration file .jscsrc:

{
  ...
  "additionalRules": [
    'node_modules/jscs-plugin/rules/*'
  ]
}

Browser Usage

File jscs-plugin-browser.js contains browser-compatible version of jscs-plugin.

Download and include jscs-plugin-browser.js into your page just after jscs-browser.js.

<script src="jscs-browser.js"></script>
<script src="jscs-plugin-browser.js"></script>
<script>
    var checker = new JscsStringChecker();
    checker.registerDefaultRules();
    checker.configure({yourPluginRules: {...}});
    var errors = checker.checkString('var x, y = 1;');
    errors.getErrorList().forEach(function(error) {
        console.log(errors.explainError(error));
    });
</script>