Comments (9)
Working as intended. It's supposed to warn you on code formatting violations, which is what it's doing.
from gulp-jscs.
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.
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.
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.
from gulp-jscs.
@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.
@sindresorhus You should use the new PluginError stuff from gulp-util to lose the stack on these
from gulp-jscs.
@contra Yeah, I'm planning to go through my plugins, but waiting on the streaming changes to be sorted out first.
from gulp-jscs.
@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)
- Incompatibility with harmony-reflect HOT 1
- Support values other than true/false HOT 1
- Stop .pipe() chain on linting error?
- Unclear error when .jscsrc is missing HOT 5
- Cannot read property 'tokTypes' of undefined - urgent
- Allow indented "break" in "switch" statement. HOT 2
- install broken due to downstream dependency left-pad being unpublished HOT 2
- JSCS errors getting swallowed somewhere HOT 6
- Cannot convert undefined or null to object HOT 5
- Update to JSCS 3.0 HOT 1
- file.jscs.errors is an object not an array
- How can I use fix:true with a watch?
- JSCS reporter compatibility HOT 2
- JSCS unreasonably complain about the beginning of a js file HOT 1
- Integration with Sonar rules
- jscs domain has expired
- editorconfig + jscs
- Replace deprecated dependency gulp-util
- Linting solution incompatible with 'engines' field in package.json
- TypeError: Cannot convert undefined or null to object at Function.keys HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gulp-jscs.