-
Notifications
You must be signed in to change notification settings - Fork 73
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
stylelint + gulp-postcss doesn't work for subfolders #107
Comments
I'm running into the same issue. Though when I run my full gulp build If I run just my task No solution yet, but I'm assuming it's gulp-postcss, since like you I tried running it through the CLI and it's working perfectly as well. I'll look into it more this weekend. Below is how my call to postcss and stylelint
|
A little more information is this might be due to the stream module and the way it is handling globing those files. When I thought I found that out by and again running the full |
Hi! Thanks for the issue. Can you set up a minimal example that reproduces this issue and publish it on GitHub? |
I set up a repo at https://github.com/chrispelzer/testing-stylelint to test this out and it seems my issue might be more related to something going on with me extending the task for Laravel Elixir. The master branch using just a gulp task with gulp-postcss, stylelint, reporter will go through all scss files and stylelint them correctly. The gulp-debug will report that all files are being passed through for both branches when running There are 2 branches
|
@chrispelzer you should probably listen to |
@w0rm |
@alx-khramov you always have to return a stream from a gulp task, this way gulp understands when the task is terminated. Can you try if adding return to the line below fixes your problem?
|
@w0rm Yes. That fixed the problem on this demo, thanks. But on the actual project I have a more complicated config: And I don't see yet how I can just return a stylelint stream there. Also it's pretty not obvious how returning a stream is related to proper files processing, but thanks for the help anyway. I guess I need to rewrite the config. |
You can read about it in the gulp documentation: https://github.com/gulpjs/gulp/blob/master/docs/API.md#async-task-support |
I use gulp 3.9.1, gulp-postcss 6.2.0 and stylelint 7.6.0 for SCSS linting. OS is Ubuntu.
A related part of my gulp config looks like this:
The problem:
Stylelint works great for files like
app/assets_src/styles/file.scss
but it doesn't process files in subfolders like:
app/assets_src/styles/blocks/home/file.scss
Also the weird thing is that in some very rare times it fires once for such nested files, but then stops working again.I've tried to use such paths:
But no luck.
Using this cli command:
stylelint 'app/assets_src/styles/**/*.scss'
works good and processes subdirectories.So maybe the issue is related to gulp-postcss.
The text was updated successfully, but these errors were encountered: