wikimedia/mediawiki-extensions-WikiLove

View on GitHub
Gruntfile.js

Summary

Maintainability
A
1 hr
Test Coverage
'use strict';

module.exports = function ( grunt ) {
    grunt.loadNpmTasks( 'grunt-eslint' );
    grunt.loadNpmTasks( 'grunt-banana-checker' );
    grunt.loadNpmTasks( 'grunt-stylelint' );

    grunt.initConfig( {
        banana: {
            options: {
                requireLowerCase: false
            },
            all: [
                'i18n/',
                'i18n/api'
            ]
        },
        eslint: {
            options: {
                cache: true,
                fix: grunt.option( 'fix' )
            },
            all: [
                '**/*.{js,json,vue}',
                '!node_modules/**',
                '!vendor/**'
            ]
        },
        stylelint: {
            all: [
                '**/*.{css,less,vue}',
                '!node_modules/**',
                '!vendor/**'
            ]
        }
    } );

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