Skip to content

Commit

Permalink
chore(sass): add sass linting
Browse files Browse the repository at this point in the history
  • Loading branch information
johngruen committed Nov 18, 2015
1 parent 9d7b449 commit fc1ef04
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .sass-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
rules:
force-attribute-nesting: 0
force-element-nesting: 0
force-pseudo-nesting: 0
no-ids: 0
8 changes: 8 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const normalize = require('node-normalize-scss');
const rename = require('gulp-rename');
const runSequence = require('run-sequence');
const sass = require('gulp-sass');
const sassLint = require('gulp-sass-lint');
const source = require('vinyl-source-stream');
const sourcemaps = require('gulp-sourcemaps');
const through = require('through2');
Expand Down Expand Up @@ -127,6 +128,13 @@ gulp.task('styles', function stylesTask() {
.pipe(gulp.dest(DEST_PATH + 'styles'));
});

gulp.task('sass-lint', function sassLintTask() {
return gulp.src(SRC_PATH + '/styles/**/*.scss')
.pipe(sassLint())
.pipe(sassLint.format())
.pipe(sassLint.failOnError());
});

gulp.task('images', function imagesTask() {
return gulp.src(SRC_PATH + 'images/**/*')
.pipe(cache(imagemin({ optimizationLevel: 3, progressive: true, interlaced: true })))
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"gulp-minify-css": "^1.2.0",
"gulp-rename": "^1.2.2",
"gulp-sass": "^2.0.4",
"gulp-sass-lint": "^1.1.0",
"gulp-sourcemaps": "^1.5.2",
"gulp-uglify": "^1.2.0",
"gulp-util": "^3.0.6",
Expand Down

0 comments on commit fc1ef04

Please sign in to comment.