build: Add stylelint to validate less file

less file added in 1094dbfbff

Change-Id: I151367d1db71e1515e9639d35f95373ed986ab70
This commit is contained in:
Umherirrender 2024-11-20 22:59:10 +01:00
parent 827bc8d0ce
commit 50e5b93f1e
5 changed files with 2953 additions and 92 deletions

1
.gitignore vendored
View file

@ -6,3 +6,4 @@ composer.lock
vendor
node_modules/
.eslintcache
.stylelintcache

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-banana-checker' );
grunt.loadNpmTasks( 'grunt-eslint' );
grunt.loadNpmTasks( 'grunt-stylelint' );
grunt.initConfig( {
eslint: {
@ -16,9 +17,19 @@ module.exports = function ( grunt ) {
'!vendor/**'
]
},
banana: conf.MessagesDirs
banana: conf.MessagesDirs,
stylelint: {
options: {
cache: true
},
all: [
'**/*.{css,less}',
'!node_modules/**',
'!vendor/**'
]
}
} );
grunt.registerTask( 'test', [ 'eslint', 'banana' ] );
grunt.registerTask( 'test', [ 'eslint', 'banana', 'stylelint' ] );
grunt.registerTask( 'default', 'test' );
};

3022
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -8,6 +8,8 @@
"eslint-config-wikimedia": "0.28.2",
"grunt": "1.6.1",
"grunt-banana-checker": "0.13.0",
"grunt-eslint": "24.3.0"
"grunt-eslint": "24.3.0",
"grunt-stylelint": "0.20.1",
"stylelint-config-wikimedia": "0.17.2"
}
}