mediawiki-extensions-Templa.../Gruntfile.js
Umherirrender d877470a70 Use json extension for .stylelintrc
Bug: T173516
Change-Id: Idfe75af687cc556c9369e6a68119d41ec67bef59
2017-08-19 10:35:07 +02: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' );
};