mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Linter
synced 2024-12-12 16:05:25 +00:00
build: Add stylelint to validate less file
less file added in 1094dbfbff
Change-Id: I151367d1db71e1515e9639d35f95373ed986ab70
This commit is contained in:
parent
827bc8d0ce
commit
50e5b93f1e
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -6,3 +6,4 @@ composer.lock
|
|||
vendor
|
||||
node_modules/
|
||||
.eslintcache
|
||||
.stylelintcache
|
||||
|
|
3
.stylelintrc.json
Normal file
3
.stylelintrc.json
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"extends": "stylelint-config-wikimedia"
|
||||
}
|
15
Gruntfile.js
15
Gruntfile.js
|
@ -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
3022
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -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"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue