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!
This commit is contained in:
parent
70b6eb09a8
commit
1c8305cf1a
12
make.js
12
make.js
@ -1464,18 +1464,6 @@ target.lint = function() {
|
|||||||
echo('### Linting JS files');
|
echo('### Linting JS files');
|
||||||
|
|
||||||
var jshintPath = path.normalize('./node_modules/.bin/jshint');
|
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.
|
// Lint the Firefox specific *.jsm files.
|
||||||
var options = '--extra-ext .jsm';
|
var options = '--extra-ext .jsm';
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user