gulp-rb-validate-js

Gulp plugin to check JS files according to web frontend guidelines

Usage no npm install needed!

<script type="module">
  import gulpRbValidateJs from 'https://cdn.skypack.dev/gulp-rb-validate-js';
</script>

README

Installation

Install package with NPM and add it to your development dependencies:

npm install gulp-rb-validate-js --save-dev

Usage

Basic

var rbjs   = require('gulp-rb-validate-js');

gulp.task('rb-validate', function () {

    gulp.src('./src/**/*.js')
        .pipe(rbjs());
        
    });

With Parameter

var rbjs  = require('gulp-rb-validate-js');

gulp.task('rb-validate', function () {

    gulp.src('./src/**/*.js')
        .pipe(rbjs({
            exitOnError: true,
            indentPattern: '\t'
         });
        
    });

Parameters

exitOnError: Boolean (Default: false)

Exit with code 1 if an error with obligation level red is found.

indentPattern: String (Default: 2 spaces)

Define the indentation pattern.

checkIndent: Boolean (Default: true)

Set to false to deactivate indentation check.