Set-up Sass Lint with Gulp – Design & Front-end Development

Set-up Sass Lint with Gulp – Design & Front-end Development


In this tutorial I’m going to show you how to get set-up with linting for Sass using Gulp.

First lets install Gulp Sass Lint in your project:

npm install gulp-sass-lint --save-dev

Now lets call Sass Lint in our Gulpfile. You can use ! at the start of a file location to stop it from being linted.

Next up you need to create your .sass-lint.yml file, this is the config that the linter will use to show warnings and errors in your Sass. Create the file in the root of your project.

I’ve whipped up a good starting point for your .sass-lint.yml so you can copy and paste that into your own file. Feel free to chop and change the file so it works for your coding style.

Now head to your terminal and run gulp sass-lint and you should see the linter doing its job!



Source link


Leave a Reply

Your email address will not be published. Required fields are marked *