Skip to content

omakasecorp/gulp-jsxcs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gulp-jsxcs Build Status

Check JSX code style with JSCS.

Install

$ npm install --save-dev gulp-jsxcs

Usage

To perform JSX code style checks using the default JSCS configuration path at ./.jscsrc, run the following.

var gulp = require('gulp'),
    jsxcs = require('gulp-jsxcs');

gulp.task('default', function () {
     return gulp.src('src/app.js')
         .pipe(jsxcs());
});

You may also explicitly define the JSCS configuration file.

var gulp = require('gulp'),
    jsxcs = require('gulp-jsxcs');

gulp.task('default', function () {
    return gulp.src('src/app.js')
        .pipe(jsxcs('./my-jscs-config.json'));
});

If you do not wish to rely on a configuration file, you may pass the JSCS options directly.

var gulp = require('gulp'),
    jsxcs = require('gulp-jsxcs');

gulp.task('default', function () {
    return gulp.src('src/app.js')
        .pipe(jsxcs({
            disallowTrailingComma: true,
            validateQuoteMarks: {
                escape: true,
                mark: '\''
            }
        }));
});

JSCS Options

See the JSCS options for details on the options available for checking.

License

MIT © Adam Gschwender

Acknowlegements

This module is little more than a merge of gulp-jscs, gulp-react and jsxcs. So a thank you to the contributors of those projects.