mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/RelatedArticles
synced 2024-11-13 18:26:56 +00:00
7ebe784fc2
Changes: * Extend the definition of all JavaScript files to include those in the tests directory * Run JSHint and JSCS against all JavaScript files * Fix the existing code style errors in the RelatedPagesGateway test Change-Id: Ia6d8fa63e0b86760857d4480a0575b57512fa36b
39 lines
702 B
JavaScript
39 lines
702 B
JavaScript
/*jshint node:true */
|
|
module.exports = function ( grunt ) {
|
|
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
|
|
grunt.loadNpmTasks( 'grunt-jsonlint' );
|
|
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
|
grunt.loadNpmTasks( 'grunt-jscs' );
|
|
|
|
grunt.initConfig( {
|
|
files: {
|
|
all: [
|
|
'resources/**/*.js',
|
|
'tests/**/*.js'
|
|
]
|
|
},
|
|
jshint: {
|
|
options: {
|
|
jshintrc: true
|
|
},
|
|
all: '<%= files.all %>'
|
|
},
|
|
jscs: {
|
|
src: '<%= files.all %>'
|
|
},
|
|
banana: {
|
|
all: 'i18n/'
|
|
},
|
|
jsonlint: {
|
|
all: [
|
|
'*.json',
|
|
'**/*.json',
|
|
'!node_modules/**'
|
|
]
|
|
}
|
|
} );
|
|
|
|
grunt.registerTask( 'test', [ 'jshint', 'jscs', 'jsonlint', 'banana' ] );
|
|
grunt.registerTask( 'default', 'test' );
|
|
};
|