Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/qfox/node-jscs-plugin-tpl

Stub project for JSCS plugins
https://github.com/qfox/node-jscs-plugin-tpl

Last synced: 23 days ago
JSON representation

Stub project for JSCS plugins

Awesome Lists containing this project

README

        

# node-jscs plugin volo tpl [![Build Status](https://travis-ci.org/zxqfox/node-jscs-plugin-tpl.svg?branch=master)](https://travis-ci.org/zxqfox/node-jscs-plugin-tpl)

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

* JSCS: https://github.com/mdevils/node-jscs/

## 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](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`.

```html

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));
});

```