Git Product home page Git Product logo

Comments (9)

sindresorhus avatar sindresorhus commented on August 15, 2024

Working as intended. It's supposed to warn you on code formatting violations, which is what it's doing.

from gulp-jscs.

6aKa avatar 6aKa commented on August 15, 2024

I cann't understand this.
Why style checker crashe task. If i run this task from watch... Crash task, watch, gulp.
As for me it's no sense. Style checker: check style, write errors thats all.
I must be able to build project with js style errors or warnings.

from gulp-jscs.

sindresorhus avatar sindresorhus commented on August 15, 2024

Please read the Gulp documentation. You can handle the error if you want.

https://github.com/gulpjs/gulp/wiki#articles-and-recipes

from gulp-jscs.

6aKa avatar 6aKa commented on August 15, 2024

I don't need handle error from checker. I want stream, pipe... Checker should not break stream.
JSHint, example not crached stream. Check and write error. That's all.

gulp.task('build:scripts', function() {
  gulp.src(path.join(app.scripts.src, '**/*.js'))
    .pipe(jshint())
    .pipe(jshint.reporter())
    .pipe(jscs())
    .pipe(gulp.env.production ? tasks.uglify() : tasks.util.noop())
    .pipe(gulp.dest(app.scripts.dst));
});

I read https://github.com/gulpjs/gulp/wiki#articles-and-recipes.
First trick write after dissqussion my issue gulpjs/gulp#82
Second trick has no relation to handle errors.

from gulp-jscs.

sindresorhus avatar sindresorhus commented on August 15, 2024

@contra

from gulp-jscs.

yocontra avatar yocontra commented on August 15, 2024

@6aKa gulp-jshint is planned to start emitting errors as well. You need to handle the error yourself like this

gulp.task('build:scripts', function() {
  gulp.src(path.join(app.scripts.src, '**/*.js'))
    .pipe(jshint())
    .pipe(jshint.reporter())
    .pipe(jscs().on('error', gutil.log))
    .pipe(gulp.env.production ? tasks.uglify() : tasks.util.noop())
    .pipe(gulp.dest(app.scripts.dst));
});

Keep in mind that gulp is standard node and doesn't have any magic error handling. Plugins will emit errors, you need to handle them.

from gulp-jscs.

yocontra avatar yocontra commented on August 15, 2024

@sindresorhus You should use the new PluginError stuff from gulp-util to lose the stack on these

from gulp-jscs.

sindresorhus avatar sindresorhus commented on August 15, 2024

@contra Yeah, I'm planning to go through my plugins, but waiting on the streaming changes to be sorted out first.

from gulp-jscs.

yocontra avatar yocontra commented on August 15, 2024

@sindresorhus We're leaving everything where it is. Basically all that has changed is that if you are a fundamentally buffered library and you want to support streams you can use @nfroidure's new BufferStream module to make it easy

Took quite a clusterfk to get to that decision but I'm confident in it

from gulp-jscs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.