mediawiki-extensions-Multim.../Gruntfile.js
Ed Sanders e7ff2ba8b6 build: Introduce stylelint and make pass
Change-Id: I6f97359c6f34f2e5687ce91ab9926c493e613bf5
2016-07-19 13:51:05 -07:00

51 lines
920 B
JavaScript

/*jshint node:true */
module.exports = function ( grunt ) {
grunt.loadNpmTasks( 'grunt-banana-checker' );
grunt.loadNpmTasks( 'grunt-jscs' );
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
grunt.loadNpmTasks( 'grunt-jsonlint' );
grunt.loadNpmTasks( 'grunt-stylelint' );
grunt.initConfig( {
banana: {
all: 'i18n/'
},
jsonlint: {
all: [
'**/*.json',
'!node_modules/**'
]
},
jshint: {
options: {
jshintrc: true
},
all: [
'*.js',
'resources/mmv/**/*.js',
'tests/**/*.js'
]
},
jscs: {
fix: {
options: {
fix: true
},
src: '<%= jshint.all %>'
},
main: {
src: '<%= jshint.all %>'
}
},
stylelint: {
options: {
syntax: 'less'
},
src: 'resources/mmv/**/*.{css,less}'
}
} );
grunt.registerTask( 'test', [ 'jshint', 'jscs:main', 'stylelint', 'jsonlint', 'banana' ] );
grunt.registerTask( 'default', 'test' );
};