mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CodeMirror
synced 2024-11-23 22:03:28 +00:00
45ebd2d55d
Test jshint and jscs through npm using latest version of jscs and jshint. Add support for composer.json running phplint and in the future php code sniffer. Change-Id: Id8f11f9414fae8313dc18a857a07e11694354dcb
36 lines
664 B
JavaScript
36 lines
664 B
JavaScript
/*jshint node:true */
|
|
module.exports = function ( grunt ) {
|
|
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
|
|
grunt.loadNpmTasks( 'grunt-jsonlint' );
|
|
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
|
grunt.loadNpmTasks( 'grunt-jscs' );
|
|
|
|
grunt.initConfig( {
|
|
jshint: {
|
|
options: {
|
|
jshintrc: true
|
|
},
|
|
all: [
|
|
'**/*.js',
|
|
'!resources/lib/**',
|
|
'!node_modules/**'
|
|
]
|
|
},
|
|
jscs: {
|
|
src: '<%= jshint.all %>'
|
|
},
|
|
banana: {
|
|
all: 'i18n/'
|
|
},
|
|
jsonlint: {
|
|
all: [
|
|
'**/*.json',
|
|
'!node_modules/**'
|
|
]
|
|
}
|
|
} );
|
|
|
|
grunt.registerTask( 'test', [ 'jshint', 'jscs', 'jsonlint', 'banana' ] );
|
|
grunt.registerTask( 'default', 'test' );
|
|
};
|