From 5f4d957c21d809352a96c40bdee04e147cea8cbd Mon Sep 17 00:00:00 2001 From: Dan Poltawski Date: Tue, 28 Jun 2016 10:41:18 +0100 Subject: [PATCH] MDL-54889 jshint: stop using for everything but shifter Now jshint has been replaced by eslint. --- .jshintrc | 3 +++ Gruntfile.js | 8 +------- npm-shrinkwrap.json | 28 ++++------------------------ package.json | 1 - 4 files changed, 8 insertions(+), 32 deletions(-) diff --git a/.jshintrc b/.jshintrc index ee94a0510c62f..b93ac60b00ca0 100644 --- a/.jshintrc +++ b/.jshintrc @@ -1,3 +1,6 @@ +// NOTE: We use eslint now. This file is used only by shifter. We keep the configuration +// here because shifter uses jshint after modules have been concating. Eslint can't +// currently do this. { "asi": false, "bitwise": true, diff --git a/Gruntfile.js b/Gruntfile.js index d83215310ff17..0b52cc86b8111 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -101,10 +101,6 @@ module.exports = function(grunt) { // Project configuration. grunt.initConfig({ - jshint: { - options: {jshintrc: '.jshintrc'}, - amd: { src: amdSrc } - }, eslint: { // Even though warnings dont stop the build we don't display warnings by default because // at this moment we've got too many core warnings. @@ -288,7 +284,6 @@ module.exports = function(grunt) { var files = Object.keys(changedFiles); grunt.config('eslint.amd.src', files); grunt.config('eslint.yui.src', files); - grunt.config('jshint.amd.src', files); grunt.config('uglify.amd.files', [{ expand: true, src: files, rename: uglifyRename }]); grunt.config('shifter.options.paths', files); changedFiles = Object.create(null); @@ -301,7 +296,6 @@ module.exports = function(grunt) { // Register NPM tasks. grunt.loadNpmTasks('grunt-contrib-uglify'); - grunt.loadNpmTasks('grunt-contrib-jshint'); grunt.loadNpmTasks('grunt-contrib-less'); grunt.loadNpmTasks('grunt-contrib-watch'); grunt.loadNpmTasks('grunt-eslint'); @@ -310,7 +304,7 @@ module.exports = function(grunt) { grunt.registerTask('shifter', 'Run Shifter against the current directory', tasks.shifter); grunt.registerTask('ignorefiles', 'Generate ignore files for linters', tasks.ignorefiles); grunt.registerTask('yui', ['eslint:yui', 'shifter']); - grunt.registerTask('amd', ['eslint:amd', 'jshint', 'uglify']); + grunt.registerTask('amd', ['eslint:amd', 'uglify']); grunt.registerTask('js', ['amd', 'yui']); // Register CSS taks. diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 6411bc5d0b207..11749acac9d7b 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -843,11 +843,6 @@ } } }, - "grunt-contrib-jshint": { - "version": "0.11.3", - "from": "grunt-contrib-jshint@0.11.3", - "resolved": "https://registry.npmjs.org/grunt-contrib-jshint/-/grunt-contrib-jshint-0.11.3.tgz" - }, "grunt-contrib-less": { "version": "1.1.0", "from": "grunt-contrib-less@1.1.0", @@ -1054,7 +1049,8 @@ "dependencies": { "lodash": { "version": "4.13.1", - "from": "lodash@>=4.3.0 <5.0.0" + "from": "lodash@4.13.1", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.13.1.tgz" } } }, @@ -1185,23 +1181,6 @@ "from": "jsbn@>=0.1.0 <0.2.0", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.0.tgz" }, - "jshint": { - "version": "2.8.0", - "from": "jshint@>=2.8.0 <2.9.0", - "resolved": "https://registry.npmjs.org/jshint/-/jshint-2.8.0.tgz", - "dependencies": { - "lodash": { - "version": "3.7.0", - "from": "lodash@>=3.7.0 <3.8.0", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.7.0.tgz" - }, - "minimatch": { - "version": "2.0.10", - "from": "minimatch@>=2.0.0 <2.1.0", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz" - } - } - }, "jslint": { "version": "0.3.4", "from": "jslint@>=0.3.0 <0.4.0", @@ -1801,7 +1780,8 @@ "dependencies": { "lodash": { "version": "4.13.1", - "from": "lodash@>=4.0.0 <5.0.0" + "from": "lodash@>=4.0.0 <5.0.0", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.13.1.tgz" } } }, diff --git a/package.json b/package.json index 5989a0ea0c3de..fa72459b2b953 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,6 @@ "devDependencies": { "async": "^1.5.2", "grunt": "0.4.5", - "grunt-contrib-jshint": "0.11.3", "grunt-contrib-less": "1.1.0", "grunt-contrib-uglify": "0.11.0", "grunt-contrib-watch": "0.6.1",