grunt:check performs CssLint on .scss files in _scss folder
happycollision opened this issue · 3 comments
Inside the generated Gruntfile:
csslint: {
options: {
csslintrc: '.csslintrc'
},
check: {
src: [
'<%= yeoman.app %>/css/**/*.css',
'<%= yeoman.app %>/_scss/**/*.scss'
]
}
},
Is this actually the desired behavior? If I drop a .scss
file that uses any sass syntax (like @mixin
for example) into the _scss
folder, grunt check
errors out.
Am I misunderstanding the way this generator expects to be used?
I was running in to this issue as well; thought briefly about moving the csslint
to post-build but in the end I just removed that second line from the Gruntfile.
I removed CssLint altogether. I am only using sass in my project and compass will not create malformed css. I know not everyone would do that, so that's just me. Although, I think that one of the other tasks might double as a linter as well as things get crushed down for distribution. I could be wrong.
I got this too. Changed the csslint task to:
csslint: {
options: {
csslintrc: '.csslintrc'
},
check: {
src: [
'<%= yeoman.app %>/css/**/*.css'
]
}
},
scsslint: {
// See https://www.npmjs.org/package/grunt-scss-lint for options.
allFiles: [
'<%= yeoman.app %>/_scss/**/*.scss'
]
},
And added 'scsslint'
to the end of the existing check
task.
This uses grunt-scss-lint which requires the scss-lint Ruby gem. I added these to the Gemfile and package.json, and it lints nicely.