From 5b81b35bf878e5748db6d3a263c140cbea9df525 Mon Sep 17 00:00:00 2001 From: Anthony Lapenna Date: Thu, 4 May 2017 10:17:55 +0200 Subject: [PATCH] chore(gruntfile): use eslint instead of jshint --- gruntfile.js | 27 +++++++-------------------- package.json | 3 ++- 2 files changed, 9 insertions(+), 21 deletions(-) diff --git a/gruntfile.js b/gruntfile.js index d9f9254b1..953018dc2 100644 --- a/gruntfile.js +++ b/gruntfile.js @@ -1,7 +1,7 @@ module.exports = function (grunt) { grunt.loadNpmTasks('grunt-contrib-concat'); - grunt.loadNpmTasks('grunt-contrib-jshint'); + grunt.loadNpmTasks('gruntify-eslint'); grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks('grunt-contrib-clean'); grunt.loadNpmTasks('grunt-contrib-copy'); @@ -16,7 +16,7 @@ module.exports = function (grunt) { grunt.loadNpmTasks('grunt-replace'); // Default task. - grunt.registerTask('default', ['jshint', 'build']); + grunt.registerTask('default', ['eslint', 'build']); grunt.registerTask('build', [ 'clean:app', 'if:unixBinaryNotExist', @@ -110,7 +110,7 @@ module.exports = function (grunt) { 'clean:tmp', 'replace' ]); - grunt.registerTask('lint', ['jshint']); + grunt.registerTask('lint', ['eslint']); grunt.registerTask('run', ['if:unixBinaryNotExist', 'build', 'shell:buildImage', 'shell:run']); grunt.registerTask('run-swarm', ['if:unixBinaryNotExist', 'build', 'shell:buildImage', 'shell:runSwarm', 'watch:buildSwarm']); grunt.registerTask('run-swarm-local', ['if:unixBinaryNotExist', 'build', 'shell:buildImage', 'shell:runSwarmLocal', 'watch:buildSwarm']); @@ -335,24 +335,11 @@ module.exports = function (grunt) { tasks: ['build', 'shell:buildImage', 'shell:runSsl', 'shell:cleanImages'] } }, - jshint: { - files: ['gruntfile.js', '<%= src.js %>'], + eslint: { + src: ['gruntfile.js', '<%= src.js %>'], options: { - curly: true, - eqeqeq: true, - immed: true, - indent: 2, - latedef: 'nofunc', - newcap: true, - noarg: true, - sub: true, - boss: true, - eqnull: true, - globals: { - angular: false, - '$': false - } - } + configFile: '.eslintrc.yml' + } }, shell: { buildImage: { diff --git a/package.json b/package.json index 206b6ce7d..1e2a267f2 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,8 @@ "grunt-recess": "~0.3", "grunt-replace": "^1.0.1", "grunt-shell": "^1.1.2", - "grunt-usemin": "^3.1.1" + "grunt-usemin": "^3.1.1", + "gruntify-eslint": "^3.1.0" }, "scripts": { "postinstall": "bower install"