mediawiki-extensions-Thanks/Gruntfile.js
Kunal Mehta 4b886a4ae5 build: Adding configuration for jsonlint
Change-Id: Ib8b38fa5afaa25057c61d9b7e266d4b37382bea7
2015-06-11 21:50:10 -07:00

59 lines
1.1 KiB
JavaScript

/*!
* Grunt file
*
* @package Flow
*/
/*jshint node:true */
module.exports = function ( grunt ) {
grunt.loadNpmTasks( 'grunt-contrib-csslint' );
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
grunt.loadNpmTasks( 'grunt-contrib-watch' );
grunt.loadNpmTasks( 'grunt-jsonlint' );
grunt.loadNpmTasks( 'grunt-banana-checker' );
grunt.loadNpmTasks( 'grunt-jscs' );
grunt.initConfig( {
jshint: {
options: {
jshintrc: true
},
all: [
'*.js',
'modules/**/*.js',
'tests/qunit/**/*.js'
]
},
jscs: {
src: '<%= jshint.all %>'
},
csslint: {
options: {
csslintrc: '.csslintrc'
},
all: 'modules/**/*.css'
},
banana: {
all: 'i18n/'
},
watch: {
files: [
'.{csslintrc,jscsrc,jshintignore,jshintrc}',
'<%= jshint.all %>',
'<%= csslint.all %>'
],
tasks: 'test'
},
jsonlint: {
all: [
'**/*.json',
'!node_modules/**'
]
}
} );
grunt.registerTask( 'lint', [ 'jscs', 'jshint', 'csslint', 'jsonlint', 'banana' ] );
grunt.registerTask( 'test', 'lint' );
grunt.registerTask( 'default', 'test' );
};