From f8dfcb1a029c47af6725e5b0b2afb330de3f96aa Mon Sep 17 00:00:00 2001 From: paladox Date: Fri, 10 Jul 2015 14:22:46 +0200 Subject: [PATCH] Update BoilerPlate tests Add jsonlint test Add .jshintignore Move phpcs to a seperate file. Change-Id: Ie12612e52e9e8dd41e6efb3127013671ca0052fc --- .jshintignore | 1 + Gruntfile.js | 13 ++++++++++--- composer.json | 2 +- package.json | 5 +++-- phpcs.xml | 7 +++++++ 5 files changed, 22 insertions(+), 6 deletions(-) create mode 100644 .jshintignore create mode 100644 phpcs.xml diff --git a/.jshintignore b/.jshintignore new file mode 100644 index 0000000..3c3629e --- /dev/null +++ b/.jshintignore @@ -0,0 +1 @@ +node_modules diff --git a/Gruntfile.js b/Gruntfile.js index f04a4b9..56ff218 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1,8 +1,9 @@ /*jshint node:true */ module.exports = function ( grunt ) { grunt.loadNpmTasks( 'grunt-contrib-jshint' ); - grunt.loadNpmTasks( 'grunt-jscs' ); + grunt.loadNpmTasks( 'grunt-jsonlint' ); grunt.loadNpmTasks( 'grunt-banana-checker' ); + grunt.loadNpmTasks( 'grunt-jscs' ); grunt.initConfig( { jshint: { @@ -19,10 +20,16 @@ module.exports = function ( grunt ) { }, banana: { all: 'i18n/' + }, + jsonlint: { + all: [ + '*.json', + '**/*.json', + '!node_modules/**' + ] } } ); - grunt.registerTask( 'lint', [ 'jshint', 'jscs', 'banana' ] ); - grunt.registerTask( 'test', [ 'lint' ] ); + grunt.registerTask( 'test', [ 'jshint', 'jscs', 'jsonlint', 'banana' ] ); grunt.registerTask( 'default', 'test' ); }; diff --git a/composer.json b/composer.json index 12de215..534f8fb 100644 --- a/composer.json +++ b/composer.json @@ -6,7 +6,7 @@ "scripts": { "test": [ "parallel-lint . --exclude vendor", - "phpcs . -p --standard=vendor/mediawiki/mediawiki-codesniffer/MediaWiki --ignore=vendor/*,node_modules/* --extensions=php" + "phpcs -p" ] } } diff --git a/package.json b/package.json index 4226ab6..802513e 100644 --- a/package.json +++ b/package.json @@ -7,8 +7,9 @@ "devDependencies": { "grunt": "0.4.5", "grunt-cli": "0.1.13", - "grunt-banana-checker": "0.2.2", "grunt-contrib-jshint": "0.11.2", - "grunt-jscs": "2.1.0" + "grunt-banana-checker": "0.2.2", + "grunt-jscs": "2.1.0", + "grunt-jsonlint": "1.0.4" } } diff --git a/phpcs.xml b/phpcs.xml new file mode 100644 index 0000000..cb19440 --- /dev/null +++ b/phpcs.xml @@ -0,0 +1,7 @@ + + + + . + + vendor + -- 2.11.4.GIT