diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..47e36d5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +/node_modules/ +/vendor/ +/composer.lock diff --git a/.jshintignore b/.jshintignore new file mode 100644 index 0000000..82eaa05 --- /dev/null +++ b/.jshintignore @@ -0,0 +1,2 @@ +node_modules/** +vendor/** diff --git a/Gruntfile.js b/Gruntfile.js index 9c56558..45d14da 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1,20 +1,29 @@ /*jshint node:true */ module.exports = function ( grunt ) { - grunt.loadNpmTasks( 'grunt-banana-checker' ); + grunt.loadNpmTasks( 'grunt-contrib-jshint' ); grunt.loadNpmTasks( 'grunt-jsonlint' ); + grunt.loadNpmTasks( 'grunt-banana-checker' ); grunt.initConfig( { + jshint: { + all: [ + '**/*.js', + '!node_modules/**', + '!vendor/**' + ] + }, banana: { all: 'i18n/' }, jsonlint: { all: [ '**/*.json', - '!node_modules/**' + '!node_modules/**', + '!vendor/**' ] } } ); - grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] ); + grunt.registerTask( 'test', [ 'jshint', 'jsonlint', 'banana' ] ); grunt.registerTask( 'default', 'test' ); }; diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..fbffbaf --- /dev/null +++ b/composer.json @@ -0,0 +1,10 @@ +{ + "require-dev": { + "jakub-onderka/php-parallel-lint": "0.9" + }, + "scripts": { + "test": [ + "parallel-lint . --exclude node_modules --exclude vendor" + ] + } +} diff --git a/package.json b/package.json index 76e8a82..c09af21 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,8 @@ "devDependencies": { "grunt": "0.4.5", "grunt-cli": "0.1.13", - "grunt-banana-checker": "0.2.2", - "grunt-jsonlint": "1.0.4" + "grunt-contrib-jshint": "0.11.3", + "grunt-banana-checker": "0.4.0", + "grunt-jsonlint": "1.0.6" } }