Exemplo n.º 1
0
gulp.task('js-lint', function () {

	return gulp.src(jscsOptions.src)
		.pipe(jscs())
		.on('error', noop)
		.pipe(jsStylish())
});
Exemplo n.º 2
0
 .on('finish', function () {
   gulp.src(paths)
     .pipe(jscs())
     .on('error', function () {})
     .pipe(jscsStylish())
     .on('end', done);
 });
gulp.task("check-js-style", "Enforce JavaScript code style", () =>{
    // handle errors nicely (i.e., without breaking watch)
    return utils.plumbedSrc(
        config.javascript.srcPkg
        )

        // Display the files in the stream
        //.pipe(debug({title: "Stream contents:", minimal: true}))

        // Check JS code style (uses .jscsrc)
        .pipe(
            jscs({
                configPath: config.folders.root + "/.jscsrc", // required otherwise the configuration didn't seem to get loaded
                esnext: true, // seems broken: https://github.com/jscs-dev/gulp-jscs/issues/69
                fix: false
            })
        )

        //.pipe(debug({title: "Stream contents:", minimal: true}))

        .pipe(jscsStylish()) // log style errors

        // Task result
        .pipe(size({
            title: "check-js-style"
        }));
});
Exemplo n.º 4
0
gulp.task("jscs", function() {
	return gulp.src(jsFiles)
		.pipe(jscs({
			configPath: ".jscsrc",
			fix: true
		}))
		.pipe(stylish())
		.pipe(jscs.reporter("fail"));
});
Exemplo n.º 5
0
gulp.task('lint', ['sass', 'sass_global', 'scripts', 'templates', 'fonts', 'images'], function() {
    return gulp.src([
        paths.app.app,
        paths.app.appComponents + '/**/*.js',
        paths.app.appConfig + '/**/*.js',
        paths.app.appComponents + '/**/*.js',
        paths.app.appConstants + '/**/*.js',
        paths.app.appDirectives + '/ym**/*.js',
        paths.app.appFilters + '/**/*.js',
        paths.app.appInterceptors + '/**/*.js',
        paths.app.appServices + '/**/*.js'
        ])
        .pipe(jscs())
        .pipe(stylish());
});
		gulp.task("check-js-style", "Enforce JavaScript code style", () =>{
			return gulp.plumbedSrc(// handle errors nicely (i.e., without breaking watch)
				config.javascript.src
			)

				// Display the files in the stream
				//.pipe(debug({title: "Stream contents:", minimal: true}))

				// Check JS code style (uses .jscsrc)
				.pipe(
				jscs({
					esnext: true, // seems broken: https://github.com/jscs-dev/gulp-jscs/issues/69
					fix: false
				})
			)

				.pipe(jscsStylish()) // log style errors

				// Task result
				.pipe(size({
					title: "check-js-style"
				}));
		});
Exemplo n.º 7
0
gulp.task('jscs', function() {
  return gulp.src(config.lint.selectors)
             .pipe(jscs({ verbose: true }))
             .pipe(jscsStylish());
});
Exemplo n.º 8
0
gulp.task('jscs', function () {
  return gulp.src(config.scripts.src)
     .pipe(jscs())
     .pipe(jscsStylish());
});
gulp.task('js-style', function() {
  return gulp.src(['./lib/validate.js', './test/validateTest.js'])
    .pipe(jscs())
    .pipe(stylish());
});
Exemplo n.º 10
0
gulp.task('jscs', () => {
  return gulp.src([srcFiles, unitTestFiles])
    .pipe(jscs())
    .pipe(jscsStylish());
});
Exemplo n.º 11
0
gulp.task('jscs', [ 'jshint' ], () => {
  return gulp.src('./src/**/*.js')
    .pipe(jscs({esnext:true}))
    .pipe(stylish())
    .pipe(jscs.reporter('fail'));
});