mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/RelatedArticles
synced 2024-11-13 18:26:56 +00:00
4ffb75d6c8
On my machine `npm test` fails with a lot of ESLint errors for files in vendor folder. I guess mediawiki-vagrant creates the folder. Change-Id: I5466ad8c490b39bef9a31f5442fecd2d11895b80 Depends-On: Ib7f0bd15dd0a9255e1e5140907e800478b658b92
38 lines
768 B
JavaScript
38 lines
768 B
JavaScript
/* jshint node:true */
|
|
module.exports = function ( grunt ) {
|
|
var conf = grunt.file.readJSON( 'extension.json' );
|
|
|
|
grunt.loadNpmTasks( 'grunt-eslint' );
|
|
grunt.loadNpmTasks( 'grunt-jsonlint' );
|
|
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
|
grunt.loadNpmTasks( 'grunt-stylelint' );
|
|
|
|
grunt.initConfig( {
|
|
eslint: {
|
|
all: [
|
|
'**/*.js',
|
|
'!node_modules/**',
|
|
'!resources/ext.relatedArticles.lib/**',
|
|
'!vendor/**'
|
|
]
|
|
},
|
|
banana: conf.MessagesDirs,
|
|
jsonlint: {
|
|
all: [
|
|
'**/*.json',
|
|
'.stylelintrc',
|
|
'!node_modules/**'
|
|
]
|
|
},
|
|
stylelint: {
|
|
all: [
|
|
'**/*.less',
|
|
'!node_modules/**'
|
|
]
|
|
}
|
|
} );
|
|
|
|
grunt.registerTask( 'test', [ 'eslint', 'jsonlint', 'banana', 'stylelint' ] );
|
|
grunt.registerTask( 'default', 'test' );
|
|
};
|