Commit graph

14 commits

Author SHA1 Message Date
Arlo Breault f4d2357609 Make jshint aware of node globals 2015-06-12 17:32:25 -07:00
Arlo Breault 45e39c3ac8 Make generated parsers use strict mode
* Issue #324

 * JSHint complains about two possible strict violations. But are valid
   uses of `this`, so we suppress the warnings.
2015-06-08 10:22:14 -07:00
Arlo Breault b079a056a2 Suppress linting newcap
* When the "use strict"; directive is set, constructors called without
   `new` will set the execution context to undefined. JSHint tries to be
   clever and forces on newcap. Suppress this behaviour, especially
   because newcap has gone the way of the dodo.
2015-06-08 10:19:02 -07:00
David Majda f3a83788aa Inline functions extracted just because of JSHint
Rather than extracting functions just because JSHint complained about
defining functions inside a loop, let's inline then and silence the
warning.
2014-04-27 13:31:49 +02:00
David Majda 46ac1bf171 Wrap initializer code in generated parsers into |{...}|
Initializer code is usually indented and this indentation is carried
over to generated code. This resulted in a piece of indented code in the
middle of the parser.

This commit wraps initializer code in |{...}|, which makes indentation
in generated parsers look a bit more natural.
2014-04-27 13:17:59 +02:00
David Majda e7e4543bb4 .jshintrc: Remove the "sub" option 2013-12-15 21:38:15 +01:00
David Majda e20e907d8c .jshintrc: Add the "trailing" option 2013-12-15 21:31:43 +01:00
David Majda 4402f7fd86 .jshintrc: Add the "noarg" option 2013-12-15 21:26:57 +01:00
David Majda af54963233 .jshintrc: Add the "latedef" option 2013-12-14 21:58:00 +01:00
David Majda 4362ba190c .jshintrc: Add the "immed" option 2013-12-14 21:52:51 +01:00
David Majda 43eeabf03a .jshintrc: Add the "freeze" option 2013-12-14 21:51:25 +01:00
David Majda 95fd64ec15 .jshintrc: Add the "forin" option & fix fallout
Also added few missing |hasOwnProperty| calls that JSHint didn't detect
because it only looks whether there is an |if| statement wrapping the
loop body.
2013-12-14 21:50:43 +01:00
David Majda 50be1081e0 Sort JSHint options alphabetically 2011-09-18 16:55:27 +02:00
David Majda c7f99019c2 Add "jake hint" task that checks all javaScript files using JSHint
This currently outputs many issues. These will be fixed in subsequent
commits.
2011-09-18 16:25:46 +02:00