Add stylelint for css files

Fixed the following rule:
no-missing-end-of-source-newline

Change-Id: I0ba2e411279a101870c89b733dc9315be525c937
This commit is contained in:
Umherirrender 2017-04-17 22:14:55 +02:00
parent ec8959a09a
commit 7f0c04f2b0
4 changed files with 20 additions and 5 deletions

6
.stylelintrc Normal file
View file

@ -0,0 +1,6 @@
{
"extends": "stylelint-config-wikimedia",
"rules": {
"declaration-no-important": null
}
}

View file

@ -3,6 +3,7 @@ module.exports = function ( grunt ) {
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
grunt.loadNpmTasks( 'grunt-jsonlint' );
grunt.loadNpmTasks( 'grunt-banana-checker' );
grunt.loadNpmTasks( 'grunt-stylelint' );
grunt.initConfig( {
jshint: {
@ -21,11 +22,18 @@ module.exports = function ( grunt ) {
jsonlint: {
all: [
'**/*.json',
'.stylelintrc',
'!node_modules/**'
]
},
stylelint: {
all: [
'**/*.css',
'!node_modules/**'
]
}
} );
grunt.registerTask( 'test', [ 'jshint', 'jsonlint', 'banana' ] );
grunt.registerTask( 'test', [ 'jshint', 'jsonlint', 'banana', 'stylelint' ] );
grunt.registerTask( 'default', 'test' );
};

View file

@ -4,10 +4,11 @@
"test": "grunt test"
},
"devDependencies": {
"grunt": "0.4.5",
"grunt-cli": "0.1.13",
"grunt": "1.0.1",
"grunt-banana-checker": "0.4.0",
"grunt-contrib-jshint": "1.0.0",
"grunt-jsonlint": "1.0.7"
"grunt-jsonlint": "1.0.7",
"grunt-stylelint": "0.6.0",
"stylelint-config-wikimedia": "0.4.1"
}
}

View file

@ -16,4 +16,4 @@
.mw-inputbox-input {
margin-bottom: 0.5em;
}
}