mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Gadgets
synced 2024-11-23 23:13:27 +00:00
Update Jenkins tests
Run jshint through npm instead. Also add composer.json to run phplint and in future run the php code sniffer. Signed-off-by: Antoine Musso <hashar@free.fr> Change-Id: I1797ac2bce1936ed75da76618f28fc239b60001b
This commit is contained in:
parent
ae860e5a5e
commit
11a683dd07
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -1,6 +1,7 @@
|
|||
.svn
|
||||
*~
|
||||
*.kate-swp
|
||||
.*.swp
|
||||
.idea
|
||||
node_modules/
|
||||
/node_modules/
|
||||
/vendor/
|
||||
/composer.lock
|
||||
|
|
2
.jshintignore
Normal file
2
.jshintignore
Normal file
|
@ -0,0 +1,2 @@
|
|||
node_modules
|
||||
vendor
|
24
.jshintrc
Normal file
24
.jshintrc
Normal file
|
@ -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
|
||||
}
|
||||
}
|
22
Gruntfile.js
22
Gruntfile.js
|
@ -1,19 +1,31 @@
|
|||
/*jshint node:true */
|
||||
module.exports = function ( grunt ) {
|
||||
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
||||
grunt.loadNpmTasks( 'grunt-jsonlint' );
|
||||
|
||||
var conf = grunt.file.readJSON( 'extension.json' );
|
||||
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
|
||||
grunt.loadNpmTasks( 'grunt-jsonlint' );
|
||||
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
||||
|
||||
grunt.initConfig( {
|
||||
jshint: {
|
||||
options: {
|
||||
jshintrc: true
|
||||
},
|
||||
all: [
|
||||
'**/*.js',
|
||||
'!node_modules/**',
|
||||
'!vendor/**'
|
||||
]
|
||||
},
|
||||
banana: conf.MessagesDirs,
|
||||
jsonlint: {
|
||||
all: [
|
||||
'**/*.json',
|
||||
'!node_modules/**'
|
||||
'!node_modules/**',
|
||||
'!vendor/**'
|
||||
]
|
||||
}
|
||||
} );
|
||||
|
||||
grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] );
|
||||
grunt.registerTask( 'test', [ 'jshint', 'jsonlint', 'banana' ] );
|
||||
grunt.registerTask( 'default', 'test' );
|
||||
};
|
||||
|
|
10
composer.json
Normal file
10
composer.json
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"require-dev": {
|
||||
"jakub-onderka/php-parallel-lint": "0.9"
|
||||
},
|
||||
"scripts": {
|
||||
"test": [
|
||||
"parallel-lint . --exclude node_modules --exclude vendor"
|
||||
]
|
||||
}
|
||||
}
|
|
@ -9,7 +9,8 @@
|
|||
"devDependencies": {
|
||||
"grunt": "0.4.5",
|
||||
"grunt-cli": "0.1.13",
|
||||
"grunt-contrib-jshint": "0.11.3",
|
||||
"grunt-banana-checker": "0.4.0",
|
||||
"grunt-jsonlint": "1.0.4"
|
||||
"grunt-jsonlint": "1.0.6"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue