build: Add stylelint for less file

Follow-Up: I76b9bbb939afde1d7d951925818fd15f40022ead
Change-Id: I6e08d26bce3c6903002dabf9f117ea7ff2f69383
This commit is contained in:
Umherirrender 2024-05-17 23:19:48 +02:00
parent 3224e41f04
commit bfea4d093b
5 changed files with 3043 additions and 19 deletions

3
.stylelintrc.json Normal file
View file

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

View file

@ -4,6 +4,7 @@ module.exports = function ( grunt ) {
grunt.loadNpmTasks( 'grunt-eslint' ); grunt.loadNpmTasks( 'grunt-eslint' );
grunt.loadNpmTasks( 'grunt-banana-checker' ); grunt.loadNpmTasks( 'grunt-banana-checker' );
grunt.loadNpmTasks( 'grunt-stylelint' );
grunt.initConfig( { grunt.initConfig( {
eslint: { eslint: {
@ -15,9 +16,16 @@ module.exports = function ( grunt ) {
'!{vendor,node_modules}/**' '!{vendor,node_modules}/**'
] ]
}, },
stylelint: {
all: [
'**/*.{css,less}',
'!node_modules/**',
'!vendor/**'
]
},
banana: conf.MessagesDirs banana: conf.MessagesDirs
} ); } );
grunt.registerTask( 'test', [ 'eslint', 'banana' ] ); grunt.registerTask( 'test', [ 'eslint', 'stylelint', 'banana' ] );
grunt.registerTask( 'default', 'test' ); grunt.registerTask( 'default', 'test' );
}; };

View file

@ -1,3 +1,3 @@
.ext-nuke-italicize { .ext-nuke-italicize {
font-style: italic; font-style: italic;
} }

3041
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -8,6 +8,8 @@
"eslint-config-wikimedia": "0.27.0", "eslint-config-wikimedia": "0.27.0",
"grunt": "1.6.1", "grunt": "1.6.1",
"grunt-banana-checker": "0.13.0", "grunt-banana-checker": "0.13.0",
"grunt-eslint": "24.3.0" "grunt-eslint": "24.3.0",
"grunt-stylelint": "0.19.0",
"stylelint-config-wikimedia": "0.16.1"
} }
} }