mde/jake — pull request #194 by mcandre (2013-05-10 12:57:44+00:00)
Title: Refactored away some JSHint warnings

I refactored the code to clear away more of the JSHint warnings.

JSHint before:

$ jshint .
lib\file_list.js: line 174, col 8, Missing semicolon.

lib\jake.js: line 78, col 31, Missing semicolon.
lib\jake.js: line 134, col 16, 'p' is already defined.
lib\jake.js: line 145, col 31, Missing semicolon.
lib\jake.js: line 163, col 26, Missing semicolon.
lib\jake.js: line 176, col 25, Missing semicolon.

lib\npm_publish_task.js: line 111, col 41, Missing semicolon.
lib\npm_publish_task.js: line 142, col 29, ['package'] is better written in dot notation.
lib\npm_publish_task.js: line 174, col 32, ['clobber'] is better written in dot notation.

lib\package_task.js: line 298, col 10, Don't make functions within a loop.

lib\parseargs.js: line 55, col 53, Use '===' to compare with '0'.
lib\parseargs.js: line 79, col 28, Use '===' to compare with '0'.

lib\program.js: line 221, col 25, ['__root__'] is better written in dot notation.

lib\rule.js: line 253, col 6, Missing semicolon.

lib\task\task.js: line 193, col 19, Missing semicolon.

lib\utils\index.js: line 76, col 6, Missing semicolon.
lib\utils\index.js: line 208, col 22, Use '!==' to compare with '0'.
lib\utils\index.js: line 213, col 22, Use '===' to compare with '0'.

test\exec.js: line 34, col 8, Don't make functions within a loop.

test\file_task.js: line 9, col 25, Missing semicolon.

test\parseargs.js: line 122, col 69, Duplicate key 'test --trace does not expect a value, -f does (throw howdy away)'.

test\rule.js: line 11, col 25, Missing semicolon.

22 errors

JSHint after:

$ jshint .
lib\parseargs.js: line 55, col 53, Use '===' to compare with '0'.
lib\parseargs.js: line 79, col 28, Use '===' to compare with '0'.

test\parseargs.js: line 122, col 69, Duplicate key 'test --trace does not expect a value, -f does (throw howdy away)'.

3 errors

The warnings for `lib/parseargs.js` are easy to resolve, but I thought I'd suggest [optimist](https://github.com/mde/jake/issues/193) instead.