mediawiki-extensions-Relate.../Gruntfile.js
Sam Smith 7ebe784fc2 Run JSHint and JSCS against tests
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
2015-11-06 22:08:31 +00:00

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