From 1c8305cf1aafedb079fcf504cff88762afdaf9c8 Mon Sep 17 00:00:00 2001 From: Tim van der Meij Date: Sun, 5 Apr 2015 15:48:59 +0200 Subject: [PATCH] Remove unreachable jshint installation code The previous commit implements a check for ShellJS and otherwise prompts the user to run "npm install". New clones of the codebase will need "npm install" for ShellJS and therefore automatically install jshint. Existing clones of the codebase will also need "npm install" again since ShellJS needs to be installed using NPM as it is not in the "external" folder anymore. Since everyone will get this prompt and install everything automatically, we will never reach this code path anymore. This patch makes #5908 obsolete and reduces code complexity for the lint target. Thanks to @Snuffleupagus for noticing this! --- make.js | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/make.js b/make.js index 28f7f85a2..0c8380c38 100644 --- a/make.js +++ b/make.js @@ -1464,18 +1464,6 @@ target.lint = function() { echo('### Linting JS files'); var jshintPath = path.normalize('./node_modules/.bin/jshint'); - if (!test('-f', jshintPath)) { - echo('jshint is not installed -- installing...'); - // Read the jshint version to be installed from package.json. - try { - var rawConfiguration = fs.readFileSync('package.json', 'utf8'); - var configuration = JSON.parse(rawConfiguration); - exec('npm install jshint@' + configuration.devDependencies.jshint); - } catch (e) { - echo('package.json does not exist -- aborting...'); - return; - } - } // Lint the Firefox specific *.jsm files. var options = '--extra-ext .jsm';