mediawiki-extensions-Syntax.../Gruntfile.js
Ed Sanders d150ddea1c build: Replace jshint/jscs with eslint
Change-Id: I503a57bed2ee6bb648697d6245af0b0286b5f3ec
2016-11-19 13:56:05 +00:00

56 lines
1,012 B
JavaScript

/*!
* Grunt file
*
* @package SyntaxHighlight_GeSHi
*/
/* eslint-env node */
module.exports = function ( grunt ) {
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: [
'*.js',
'modules/**/*.js'
]
},
jsonlint: {
all: [
'*.json',
'i18n/*.json',
'modules/**/*.json'
]
},
stylelint: {
all: [
'**/*.css',
'!**/*.generated.css',
'!vendor/**',
'!node_modules/**'
]
},
banana: {
options: {
disallowDuplicateTranslations: false
},
all: 'i18n/'
},
watch: {
files: [
'.{stylelintrc,jscsrc,jshintignore,jshintrc}',
'<%= eslint.all %>',
'<%= stylelint.all %>'
],
tasks: 'test'
}
} );
grunt.registerTask( 'test', [ 'eslint', 'jsonlint', 'stylelint', 'banana' ] );
grunt.registerTask( 'default', 'test' );
};