# Validation of Sass

**URL:** https://discourse.roots.io/t/validation-of-sass/4247
**Category:** sage
**Tags:** gulp
**Created:** 2015-07-14T13:57:17Z
**Posts:** 3

## Post 1 by @cichy380 — 2015-07-14T13:57:18Z

Hi,

I am novice in Gulp that is why I want to ask:  
how can I add “automatically checking SCSS/CSS code for errors” in **gulp watch**.  
Which package should I install and how should I config my gulpfile.js?

I tried [gulp-scss-lint](https://www.npmjs.com/package/gulp-scss-lint).

```
npm install gulp-scss-lint --save-dev
```

I added to my **gulpfile.js** code:

```
var scsslint = require('gulp-scss-lint');
...
gulp.task('scss-lint', function() {
    gulp.src(path.source + 'styles/*.scss')
    .pipe(scsslint({
        'endless': true
    }));
});
...
gulp.task('watch', function() {
    browserSync.init({
        files: ['{lib,templates}/**/*.php', '*.php'],
        proxy: config.devUrl,
        snippetOptions: {
            whitelist: ['/wp-admin/admin-ajax.php'],
            blacklist: ['/wp-admin/**']
        }
    });
    gulp.watch(path.source + 'styles/*.scss', ['scss-lint']); // line added by me
    gulp.watch([path.source + 'styles/**/*'], ['styles']);
    gulp.watch([path.source + 'scripts/**/*'], ['jshint', 'scripts']);
    gulp.watch([path.source + 'fonts/**/*'], ['fonts']);
    gulp.watch([path.source + 'images/**/*'], ['images']);
    gulp.watch(['bower.json', 'assets/manifest.json'], ['build']);
});
```

but when I run `gulp watch` and I change something in some SCSS file I got error:  
“_Name ‘scss-lint’ is not recognized…_”

regards  
Marcin

---

## Post 2 by @austin — 2015-07-14T17:14:33Z

Pretty sure you have to return the stream in gulp.task

`return gulp.src(....`

---

## Post 3 by @cichy380 — 2015-07-14T18:37:09Z

I changed:

```
gulp.task('scss-lint', function() {
    return gulp.src(path.source + 'styles/*.scss')
        .pipe(scsslint({
            'endless': true
        }));
});
```

but I have still the same error.
