1.2.0 • Published 9 years ago

sol-style-checker v1.2.0

Weekly downloads
14
License
-
Repository
github
Last release
9 years ago

Sol style checker

Build Status Dependencies Status DevDependencies Status npm version Code Climate

Performs code style check by using jscs. Is by default setup with the style Sol is using. And is by default checking all .js files in the repo. (Excluding node_modules).

Requirements / Peer Dependencies

Gulp.

Usage

We use gulp as our build tool, and this package exposes a style-checker function that has 2 parameters;

  • files
    The files to check Same as the first argument to jscs

  • config
    Path to the configfile. Same as --config option in jscs. Also 'esprima-fb' can be used. Then you will use the default sol check style with support for jsx.

React / JSX / esprima-fb

If you are using react with jsx or need to validate against esprima-fb. jscs support that by using the esprima-fb package.

const styleCheck = require('sol-style-check');
gulp.task('style-check', styleCheck(null, 'esprima-fb'));

Example

const styleCheck = require('sol-style-check');
gulp.task('style-check', styleCheck());