Пример #1
0
gulp.task('stylelint', function () {
  var env = global.runmode
  var isDev = (env === 'dev')

  return gulp
    .src(config.src)
    .pipe(gulpif(isDev, plumber(function (error) {
      gutil.log(gutil.colors.red(error.message))
      this.emit('end')
    })))
    .pipe(stylelint({
      syntax: 'scss',
      failAfterError: !isDev,
      reporters: [{
        formatter: 'string',
        console: true
      }]
    }))
})
Пример #2
0
gulp.task('css_qa', function () {
  const csslint = require('gulp-csslint');
  const cssbeautify = require('gulp-cssbeautify');
  const csscomb = require('gulp-csscomb');
  const gulpStylelint = require('gulp-stylelint');

  gulp.src(css_source + '*.css')
  .pipe(csscomb())
  .pipe(cssbeautify({indent: '  '}))
  .pipe(postcss([autoprefixer()]))
  .pipe(gulp.dest(css_source));

  gulp.src(css_source + '*.css')
  .pipe(csslint())
  .pipe(csslint.reporter())
  .pipe(gulpStylelint({
    reporters: [
      {formatter: 'string', console: true},
    ]
  }));
});
Пример #3
0
function lintSass(done) {
  pump(
    [
      gulp.src([
        path.join(config.sources.stylesheets, 'bas-style-kit', '**/*.scss'),
        path.join(config.sources.stylesheets, 'styles-bsk.scss'),
        path.join(config.sources.stylesheets, 'fonts', '**/*.scss'),
        path.join(config.sources.stylesheets, 'fonts-bsk.scss')
      ]),
      styleLint({
        syntax: 'scss',
        reporters: [
          {
            formatter: 'string',
            console: true
          }
        ]
      })
    ],
    done
  );
}
Пример #4
0
module.exports = (files) =>
  vfs.src(files).pipe(
    stylelint({
      reporters: [{ formatter: 'string', console: true }],
    })
  )
Пример #5
0
gulp.task('css:lint', () => {
    return gulp.src(lintPathsCSS)
        .pipe(stylelint({
            reporters: [{ formatter: 'string', console: true}]
        }));
});
Пример #6
0
gulp.task('lint', () =>
  gulp.src('src/**/*.css')
    .pipe(lint({ reporters: [{ formatter: 'verbose', console: true }] }))
gulp.task('stylelint', function lintCssTask() {
  return gulp
    .src(config.src)
    .pipe(gulpStylelint(config.options));
});