Skip to content

Commit

Permalink
Fixed #1133: Make shelljs imply node.
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephen Mathieson authored and valueof committed Jun 26, 2013
1 parent 79dc812 commit 66f3e4c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/stable/jshint.js
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ var JSHINT = (function () {

if (state.option.shelljs) {
combine(predefined, vars.shelljs);
combine(predefined, vars.node);
}

if (state.option.phantom) {
Expand Down
5 changes: 5 additions & 0 deletions tests/stable/unit/fixtures/shelljs.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,8 @@ chmod();
config.hi = 'hi';
error();
tempdir();

// node stuff
require('hi');
module.exports = 'hi';
process.exit();
3 changes: 3 additions & 0 deletions tests/stable/unit/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,9 @@ exports.shelljs = function (test) {
.addError(24, "'config' is not defined.")
.addError(25, "'error' is not defined.")
.addError(26, "'tempdir' is not defined.")
.addError(29, "'require' is not defined.")
.addError(30, "'module' is not defined.")
.addError(31, "'process' is not defined.")
.test(src, { undef: true });

TestRun(test, 2)
Expand Down

0 comments on commit 66f3e4c

Please sign in to comment.