build: Add stylelint for less file

Change-Id: I87717cd5f1a2aa55f78174d639fe7ba648837172
这个提交包含在:
Umherirrender 2024-04-02 01:31:42 +02:00
父节点 f1fffb966b
当前提交 65b0f8b3b7
共有 4 个文件被更改,包括 2861 次插入23 次删除

3
.stylelintrc.json 普通文件
查看文件

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

查看文件

@ -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 自动生成的

文件差异内容过多而无法显示 加载差异

查看文件

@ -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"
}
}