New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make more logic the filter example in README #1
Conversation
It makes no sense to only call jscs on src/vendor. The filter() is filtering the pattern you give to him, not the opposite.
I think you're reading it wrong. This is not |
Sorry I've an issue with a weird behavior (at least unexpected for me). You are right, but I'm missing something. Here is a part of my gulpfile. var jshint = require("gulp-jshint")
, jscs = require("gulp-jscs")
, jsFiles = [
"*.js"
, "*.json"
, ".jshintrc"
, ".csslintrc"
, "./src/js/**/*.js"
]
gulp.task("lint-scripts", function() {
gulp.src(jsFiles)
.pipe(plumber())
// dont jscs json files
.pipe(filter(["!*.json", "!*rc"]))
.pipe(jscs())
.pipe(filter.end())
.pipe(jshint(".jshintrc"))
.pipe(jshint.reporter("jshint-stylish"))
}) The filtering is not working as expected. What I'm missing ? |
What are you getting and what did you expect? |
jscs parse json files which return an error... |
@MoOx pushed a fix. mind trying out master? |
Yes sure. |
@sindresorhus just got the same issue (I double check, I've correctly retrieved the new version using through2. |
@MoOx sorry, about that, check master again. I forgot you need to explicitly allow files with leading dots. I added a testcase for your usage. |
Still having issue. I just take a look & add some stupid console.log() just to see. |
If you need to match subfolders you can use "**/.jshintrc" instead |
I got your point, but it's doesn't really make sense to me since my |
@MoOx can you run |
The thing is, gulp is giving the full path to the plugin, so you don't have .jshintrc or similar but /full/path/to/.jshintrc :s |
@MoOx alright, i think i nailed it. mind trying out 0.2.1? |
Hey @sindresorhus thanks for the work done, but this still don't work (I still got issue on
Note I've sucessfully installed 0.2.1
|
It makes no sense to only call jscs on src/vendor.
The filter() is filtering the pattern you give to him, not the opposite.