mediawiki-extensions-Templa.../Gruntfile.js
Ed Sanders 6565ee4cf5 build: Replace jscs/jshint with eslint
Change-Id: Iff79501de8d80a860eebb4a6e31dc8fca3285505
2016-12-02 22:05:13 +00:00

50 lines
928 B
JavaScript

/*!
* Grunt file
*
* @package TemplateData
*/
/* eslint-env node */
module.exports = function ( grunt ) {
var conf = grunt.file.readJSON( 'extension.json' );
grunt.loadNpmTasks( 'grunt-banana-checker' );
grunt.loadNpmTasks( 'grunt-contrib-watch' );
grunt.loadNpmTasks( 'grunt-eslint' );
grunt.loadNpmTasks( 'grunt-jsonlint' );
grunt.loadNpmTasks( 'grunt-stylelint' );
grunt.initConfig( {
eslint: {
all: [
'modules/**/*.js',
'tests/**/*.js'
]
},
stylelint: {
all: [
'modules/*.css',
'resources/*.css'
]
},
jsonlint: {
all: [
'**/*.json',
'!node_modules/**'
]
},
banana: conf.MessagesDirs,
watch: {
files: [
'.{stylelintrc,eslintrc.json}',
'<%= eslint.all %>',
'<%= stylelint.all %>'
],
tasks: 'test'
}
} );
grunt.registerTask( 'test', [ 'eslint', 'stylelint', 'jsonlint', 'banana' ] );
grunt.registerTask( 'default', 'test' );
};