Remove "Don't make functions within a loop." on getters. It's only thrown on getters and thus not consistent. Since it's not thrown on setters nor on simple object properties, I removed it here. Don't force "value" as parameter name of setters (see #373). Extend tests (coverage).
JSHint was incorrectly identifying duplicate properties because of numerous unsafe assumptions such as that setters always follow getters and others. This patch removes these assumptions and makes sure that we understand that 'get x, set x is okay' but 'get x, x' is not. + Tests for duplicate members and a regression test for the aforementioned bug. This is a response to #382 and a faulty merge 63382c7.
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.