I use gulp 3.9.1 and stylelint 7.6.0 for SCSS linting. OS is Ubuntu.
A related part of my gulp config looks like this:
var postcss = require('gulp-postcss');
var stylelint = require('stylelint');
var postcssReporter = require('postcss-reporter');
gulp.task('styles', function() {
...
var lintProcessors = [
stylelint(),
postcssReporter({ clearMessages: true })
];
gulp.src('app/assets_src/styles/**/*.scss')
.pipe(postcss(lintProcessors, {syntax: scssSyntax}));
...
});
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:
app/assets_src/styles/**/**/*.scss
/app/assets_src/styles/**/*.scss
'./app/assets_src/styles/**/**/*.scss'
But no luck.
Also using this cli command: stylelint 'app/assets_src/styles/**/*.scss'
works good and processes subdirectories. So maybe the issue is related to gulp-postcss plugin.