Introduce stylelint

Change-Id: Iea4d20abb8aa9d656639c8e128df0e963291cace
This commit is contained in:
Ed Sanders 2016-05-18 14:28:55 +01:00
parent f85be74e33
commit d679469840
7 changed files with 26 additions and 33 deletions

View file

@ -1,13 +0,0 @@
{
"adjoining-classes": false,
"box-model": false,
"box-sizing": false,
"fallback-colors": false,
"important": false,
"outline-none": false,
"qualified-headings": false,
"unique-headings": false,
"universal-selector": false,
"unqualified-attributes": false,
"gradients": false
}

3
.stylelintrc Normal file
View file

@ -0,0 +1,3 @@
{
"extends": "stylelint-config-wikimedia"
}

View file

@ -7,11 +7,11 @@
/*jshint node:true */
module.exports = function ( grunt ) {
grunt.loadNpmTasks( 'grunt-banana-checker' );
grunt.loadNpmTasks( 'grunt-contrib-csslint' );
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
grunt.loadNpmTasks( 'grunt-contrib-watch' );
grunt.loadNpmTasks( 'grunt-jscs' );
grunt.loadNpmTasks( 'grunt-jsonlint' );
grunt.loadNpmTasks( 'grunt-stylelint' );
grunt.initConfig( {
jshint: {
@ -33,11 +33,13 @@ module.exports = function ( grunt ) {
jscs: {
src: '<%= jshint.all %>'
},
csslint: {
options: {
csslintrc: '.csslintrc'
},
all: 'modules/**/*.css'
stylelint: {
src: [
'**/*.css',
'!**/*.generated.css',
'!vendor/**',
'!node_modules/**'
]
},
banana: {
options: {
@ -47,14 +49,14 @@ module.exports = function ( grunt ) {
},
watch: {
files: [
'.{csslintrc,jscsrc,jshintignore,jshintrc}',
'.{stylelintrc,jscsrc,jshintignore,jshintrc}',
'<%= jshint.all %>',
'<%= csslint.all %>'
'<%= stylelint.all %>'
],
tasks: 'test'
}
} );
grunt.registerTask( 'test', [ 'jshint', 'jsonlint', 'jscs', 'csslint', 'banana' ] );
grunt.registerTask( 'test', [ 'jshint', 'jsonlint', 'jscs', 'stylelint', 'banana' ] );
grunt.registerTask( 'default', 'test' );
};

View file

@ -5,7 +5,7 @@
* @license The MIT License (MIT); see LICENSE.txt
*/
.ve-ce-mwSyntaxHighlightNode pre {
.ve-ce-mwSyntaxHighlightNode pre {
/* Prevent silly wrapping on Safari and Chrome (https://bugs.webkit.org/show_bug.cgi?id=35935) */
word-wrap: normal;
}

View file

@ -10,7 +10,7 @@
}
.ve-ui-mwSyntaxHighlightDialog-content .ve-ui-mwExtensionWindow-input textarea {
font-family: monospace, Courier;
font-family: monospace, 'Courier';
}
.ve-ui-mwSyntaxHighlightDialog-content .oo-ui-comboBoxWidget > .oo-ui-menuSelectWidget {

View file

@ -6,5 +6,5 @@
*/
.ve-ui-mwSyntaxHighlightInspector-content .ve-ui-mwExtensionWindow-input textarea {
font-family: monospace, Courier;
font-family: monospace, 'Courier';
}

View file

@ -7,13 +7,14 @@
"test": "grunt test"
},
"devDependencies": {
"grunt": "0.4.5",
"grunt-cli": "0.1.13",
"grunt-banana-checker": "0.4.0",
"grunt-contrib-csslint": "0.5.0",
"grunt-contrib-jshint": "0.11.3",
"grunt-contrib-watch": "0.6.1",
"grunt-jscs": "2.1.0",
"grunt-jsonlint": "1.0.7"
"grunt": "1.0.1",
"grunt-banana-checker": "0.5.0",
"grunt-cli": "1.2.0",
"grunt-contrib-jshint": "1.0.0",
"grunt-contrib-watch": "1.0.0",
"grunt-jscs": "2.8.0",
"grunt-jsonlint": "1.0.7",
"grunt-stylelint": "0.2.0",
"stylelint-config-wikimedia": "0.1.0"
}
}