wikimedia/mediawiki-extensions-UploadWizard

View on GitHub
Gruntfile.js

Summary

Maintainability
A
1 hr
Test Coverage
'use strict';

module.exports = function ( grunt ) {
    const conf = grunt.file.readJSON( 'extension.json' );

    grunt.loadNpmTasks( 'grunt-banana-checker' );
    grunt.loadNpmTasks( 'grunt-contrib-watch' );
    grunt.loadNpmTasks( 'grunt-eslint' );
    grunt.loadNpmTasks( 'grunt-stylelint' );

    grunt.initConfig( {
        eslint: {
            options: {
                cache: true,
                fix: grunt.option( 'fix' )
            },
            all: '.'
        },
        stylelint: {
            options: {
                reportNeedlessDisables: true
            },
            all: 'resources/{**/,}*.{css,less}'
        },
        banana: conf.MessagesDirs,
        watch: {
            files: [
                '.{stylelintrc,eslintrc}.json',
                '<%= eslint.all %>',
                '<%= stylelint.all %>'
            ],
            tasks: 'test'
        }
    } );

    grunt.registerTask( 'test', [ 'eslint', 'stylelint', 'banana' ] );
    grunt.registerTask( 'default', 'test' );
};