gulp-jscs icon indicating copy to clipboard operation
gulp-jscs copied to clipboard

JSCS errors getting swallowed somewhere

Open robations opened this issue 8 years ago • 6 comments

I have a gulp task like this:

gulp.task("jscs", function () {
    gulp.src(["**/*.js"])
        .pipe(plugins.jscs())
        .pipe(plugins.jscs.reporter());
});

Depending on when errors are encountered they do not seem to be reported. For example, if I change the glob pattern to ["zzz/**/*.js", "{aaa,bbb,ccc}/**/*.js"] (in this example only the dir zzz contains errors), suddenly the reporter outputs errors.

It seems like the reporter somehow gets "saturated" with messages so I tried changing the maxErrors config for jscs but this didn't make a difference.

Installed versions:

├─┬ [email protected]
│ └─┬ [email protected]

robations avatar Apr 13 '16 14:04 robations

This sounds a little like https://github.com/jscs-dev/gulp-jscs/issues/42

robations avatar Apr 13 '16 14:04 robations

maxErrors config for jscs

Did you change that in your .jscsrc or in gulp call?

slavede avatar May 11 '16 14:05 slavede

.jscsrc I think.

robations avatar May 11 '16 14:05 robations

Hmm....i had similar issue, but putting maxErros inside .jscsrc fixed it (I was trying to pass it as part of gulp-jscs option before)

slavede avatar May 11 '16 14:05 slavede

I couldn't find any joy with it. As a workaround I added an npm build task, eg in package.json:

  "scripts": {
    "jscs": "jscs -v ./"
  }

Also considering eslint as an "extreme workaround" but I've moved onto a different project for the moment.

robations avatar May 11 '16 14:05 robations

@hzoo @markelog ...can you close this issue?

slavede avatar May 11 '16 14:05 slavede