jscs-dev / node-jscs

:arrow_heading_up: JavaScript Code Style checker (unmaintained)
https://jscs-dev.github.io
MIT License
4.97k stars 515 forks source link

TypeError: Cannot set property 'maxErrors' of undefined #2255

Closed Nganou closed 8 years ago

Nganou commented 8 years ago

I am getting the following error when running the gulp task:

GULP TASK:

gulp.task('jscs', function() { return gulp.src(['src/main/app/js/services.js', 'src/main/app/js/controllers.js', 'src/main/app/js/application.js']).pipe(jscs({fix: true})) .pipe(jscs.reporter()) .pipe(jscs.reporter('fail')) .pipe(gulp.dest('src/main/app/js/log')); }); .. ERROR: [00:43:16] TypeError: Cannot set property 'maxErrors' of undefined at module.exports (~/node_modules/gulp-jscs/index.js:31:20 . . Could this be due to the following gulp-jscs/index.js:

    // run autofix over as many errors as possible
    if (opts.fix) {
            config.maxErrors = Infinity;
    }

thank you

markelog commented 8 years ago

Issues for gulp are over there - https://github.com/jscs-dev/gulp-jscs/issues