build: Configure jshint, jsonlint, banan-checker & jscs
Change-Id: Ifab90f787bd2c4d8539698c3828c3486a3559bdb
This commit is contained in:
parent
95221186f4
commit
1a3fb084ba
|
@ -0,0 +1 @@
|
||||||
|
node_modules
|
|
@ -0,0 +1,24 @@
|
||||||
|
{
|
||||||
|
// Enforcing
|
||||||
|
"bitwise": true,
|
||||||
|
"eqeqeq": true,
|
||||||
|
"freeze": true,
|
||||||
|
"latedef": true,
|
||||||
|
"noarg": true,
|
||||||
|
"nonew": true,
|
||||||
|
"undef": true,
|
||||||
|
"unused": true,
|
||||||
|
"strict": false,
|
||||||
|
|
||||||
|
// Relaxing
|
||||||
|
"es5": false,
|
||||||
|
|
||||||
|
// Environment
|
||||||
|
"browser": true,
|
||||||
|
"jquery": true,
|
||||||
|
|
||||||
|
"globals": {
|
||||||
|
"mediaWiki": false,
|
||||||
|
"OO": false
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,32 @@
|
||||||
|
/*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' );
|
||||||
|
var conf = grunt.file.readJSON( 'skin.json' );
|
||||||
|
|
||||||
|
grunt.initConfig( {
|
||||||
|
jshint: {
|
||||||
|
options: {
|
||||||
|
jshintrc: true
|
||||||
|
},
|
||||||
|
all: [
|
||||||
|
'*.js'
|
||||||
|
]
|
||||||
|
},
|
||||||
|
jscs: {
|
||||||
|
src: '<%= jshint.all %>'
|
||||||
|
},
|
||||||
|
banana: conf.MessagesDirs,
|
||||||
|
jsonlint: {
|
||||||
|
all: [
|
||||||
|
'**/*.json',
|
||||||
|
'!node_modules/**'
|
||||||
|
]
|
||||||
|
}
|
||||||
|
} );
|
||||||
|
|
||||||
|
grunt.registerTask( 'test', [ 'jshint', 'jscs', 'jsonlint', 'banana' ] );
|
||||||
|
grunt.registerTask( 'default', 'test' );
|
||||||
|
};
|
|
@ -0,0 +1,13 @@
|
||||||
|
{
|
||||||
|
"scripts": {
|
||||||
|
"test": "grunt test"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"grunt": "0.4.5",
|
||||||
|
"grunt-cli": "0.1.13",
|
||||||
|
"grunt-contrib-jshint": "0.11.2",
|
||||||
|
"grunt-banana-checker": "0.2.2",
|
||||||
|
"grunt-jscs": "1.8.0",
|
||||||
|
"grunt-jsonlint": "1.0.4"
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue