Skip to content

Commit f8365a0

Browse files
committed
Refactor Gruntfile to use stylelint for SCSS linting.
1 parent e8255ea commit f8365a0

File tree

5 files changed

+1834
-1489
lines changed

5 files changed

+1834
-1489
lines changed

.sass-lint.yml

Whitespace-only changes.

.stylelintrc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "stylelint-config-standard-scss"
3+
}

Gruntfile.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,13 @@ module.exports = function(grunt) {
9898
}
9999
}
100100
},
101-
sasslint: {
101+
stylelint: {
102102
options: {
103-
configFile: '.sass-lint.yml'
103+
configFile: '.stylelintrc.json',
104+
formatter: 'string',
105+
failOnError: true
104106
},
105-
target: ['sass/**/*.scss']
107+
src: ['sass/**/*.scss']
106108
},
107109
robotstxt: {
108110
dist: {
@@ -139,8 +141,8 @@ module.exports = function(grunt) {
139141
grunt.loadNpmTasks('grunt-jslint');
140142
grunt.loadNpmTasks('grunt-eslint');
141143
grunt.loadNpmTasks('grunt-sass');
142-
grunt.loadNpmTasks('grunt-sass-lint');
144+
grunt.loadNpmTasks('grunt-stylelint');
143145
grunt.loadNpmTasks('grunt-replace');
144146
grunt.registerTask('default', ['build']);
145-
grunt.registerTask('build', ['htmlbuild', 'robotstxt', 'copy', 'uglify', 'jshint', 'eslint', 'jslint', 'sasslint', 'sass']);
147+
grunt.registerTask('build', ['htmlbuild', 'robotstxt', 'copy', 'uglify', 'jshint', 'eslint', 'jslint', 'stylelint', 'sass']);
146148
};

0 commit comments

Comments
 (0)