mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Thanks
synced 2024-11-27 16:20:12 +00:00
build: Add stylelint for less file
Change-Id: I87717cd5f1a2aa55f78174d639fe7ba648837172
This commit is contained in:
parent
f1fffb966b
commit
65b0f8b3b7
3
.stylelintrc.json
Normal file
3
.stylelintrc.json
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"extends": "stylelint-config-wikimedia"
|
||||
}
|
15
Gruntfile.js
15
Gruntfile.js
|
@ -12,6 +12,7 @@ module.exports = function ( grunt ) {
|
|||
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
||||
grunt.loadNpmTasks( 'grunt-contrib-watch' );
|
||||
grunt.loadNpmTasks( 'grunt-eslint' );
|
||||
grunt.loadNpmTasks( 'grunt-stylelint' );
|
||||
|
||||
grunt.initConfig( {
|
||||
eslint: {
|
||||
|
@ -22,15 +23,23 @@ module.exports = function ( grunt ) {
|
|||
all: [ '.' ]
|
||||
},
|
||||
banana: conf.MessagesDirs,
|
||||
stylelint: {
|
||||
all: [
|
||||
'**/*.{css,less}',
|
||||
'!node_modules/**',
|
||||
'!vendor/**'
|
||||
]
|
||||
},
|
||||
watch: {
|
||||
files: [
|
||||
'.eslintrc.json',
|
||||
'<%= eslint.all %>'
|
||||
'.{stylelintrc,eslintrc}.json',
|
||||
'<%= eslint.all %>',
|
||||
'<%= stylelint.all %>'
|
||||
],
|
||||
tasks: 'test'
|
||||
}
|
||||
} );
|
||||
|
||||
grunt.registerTask( 'test', [ 'eslint', 'banana' ] );
|
||||
grunt.registerTask( 'test', [ 'eslint', 'banana', 'stylelint' ] );
|
||||
grunt.registerTask( 'default', 'test' );
|
||||
};
|
||||
|
|
2864
package-lock.json
generated
2864
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -11,6 +11,8 @@
|
|||
"grunt-banana-checker": "0.11.1",
|
||||
"grunt-contrib-watch": "1.1.0",
|
||||
"grunt-eslint": "24.3.0",
|
||||
"grunt-stylelint": "0.19.0",
|
||||
"stylelint-config-wikimedia": "0.16.1",
|
||||
"svgo": "3.2.0"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue