I've setup JShint and JSCS using Gulp for an AngularJS app using the JShint and JSCS docs for options, and JSHint work as it should, but when used with JSCS I get a bunch of errors all one per file all associated to the IIFE or comment at the top of the files.
gulp.task('vet', function () {
var files = [
'./resources/assets/js/**/*.js',
'!./resources/assets/js/services/services.httpi.js',
'./*.js'
];
return gulp.src(files)
.pipe(jscs())
.pipe(jscs.reporter())
.pipe(jshint())
.pipe(jshint.reporter('jshint-stylish', {verbose: true}));
});
But when I run the vet task I get this error for all my files:
[15:15:41] Starting 'vet'...
Unsupported rule: validateJSDoc at D:\projects\app\resources\assets\js\app.config.js :
1 |(function () {
--------^
2 |
3 | 'use strict';
I've tried moving 'use strict' out of the closure (sloppy, but needed to see if it worked)
Alternatively I also tried adding a comment before the closure, but get the same error, but instead it points to the comment:
2 code style errors found.
Unsupported rule: validateJSDoc at D:\projects\app\resources\assets\js\app.module.js :
1 |/**
--------^
2 | * Application Module
3 | * @namespace Application
Are JSCS expect files to start with something specific? Anyone know how to fix this?
Check out the available JSCS rules . There's not validateJSDoc
, only jsDoc
. The reason being that validateJSDoc
was deprectated and dropped in JSCS 2.0 .
Either remove that rule from your .jscsrc
(or whatever config file you use) or fix it to make it compatible with the newer jsDoc
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.