mediawiki-extensions-Relate.../Gruntfile.js
Željko Filipin 4ffb75d6c8 ESLint should ignore vendor folder
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
2017-07-25 13:43:23 +00:00

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' );
};