JSCS plugin volo template
npm install volo
volo create {place here your plugin name} zxqfox/node-jscs-plugin-tpl
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/*'
]
}
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>