build: Run stylelint for less file

Since b2113e01 a less file exists

Change-Id: I77bbbb2dbbc9dba3ce5858fe5e0732e11ba803e5
This commit is contained in:
Umherirrender 2023-11-28 20:52:45 +01:00
parent 927a41a770
commit 4113b90e4c
5 changed files with 3223 additions and 36 deletions

6
.stylelintrc.json Normal file
View file

@ -0,0 +1,6 @@
{
"extends": [
"stylelint-config-wikimedia/support-basic",
"stylelint-config-wikimedia/mediawiki"
]
}

View file

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

3235
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -8,6 +8,8 @@
"eslint-config-wikimedia": "0.25.0", "eslint-config-wikimedia": "0.25.0",
"grunt": "1.6.1", "grunt": "1.6.1",
"grunt-banana-checker": "0.11.0", "grunt-banana-checker": "0.11.0",
"grunt-eslint": "24.0.1" "grunt-eslint": "24.0.1",
"grunt-stylelint": "0.19.0",
"stylelint-config-wikimedia": "0.16.1"
} }
} }

View file

@ -7,7 +7,7 @@
position: absolute; position: absolute;
width: 20px; width: 20px;
height: 20px; height: 20px;
background-image: url( './desc-20.png' ); background-image: url( desc-20.png );
} }
:not( figcaption ) .mw-ext-imagemap-desc-link { :not( figcaption ) .mw-ext-imagemap-desc-link {
@ -15,14 +15,17 @@
top: 5px; top: 5px;
right: 5px; right: 5px;
} }
.mw-ext-imagemap-desc-bottom-right > & { .mw-ext-imagemap-desc-bottom-right > & {
bottom: 5px; bottom: 5px;
right: 5px; right: 5px;
} }
.mw-ext-imagemap-desc-bottom-left > & { .mw-ext-imagemap-desc-bottom-left > & {
bottom: 5px; bottom: 5px;
left: 5px; left: 5px;
} }
.mw-ext-imagemap-desc-top-left > & { .mw-ext-imagemap-desc-top-left > & {
top: 5px; top: 5px;
left: 5px; left: 5px;