This commit adds a new option to JSHint called `smarttabs`. When enabled it makes JSHint tolerate tabs followed by spaces (spaces followed by tabs are prohibited no matter what). When disabled (default) JSHint will warn about any occurence of mixed tabs and spaces. SmartTabs: http://www.emacswiki.org/emacs/SmartTabs Refs GH-314 and GH-355. Thanks to Maël Nison <firstname.lastname@example.org> for the initial patch.
There is a bug when JSHint returns invalid data after unclosed regular expression (such as simple `/`). Trivial fix includes returning `it('(regexp)', c)` on L1388 but that produces a couple of redundant errors such as `Missing semicolon.`, etc. This patch makes JSHint quit it work after encountering an unclosed regular expression--we can't process a file without making mistakes after that anyway.
This approach makes sure that errors caused by undef are not in the way of other options such as latedef. The code pushes all warning about undefined variables into an array and at the end of processing checks if any of those variables were defined later in the code and can be legally used due to hoisting. Fixes GH-133. Fixes GH-347. P.S. The only thing is that it can mess up the maxerr option but we need to refactor it anyway.