Fix character position for dot notation warning
Fix character and evidence for nonew
Fix do not use {a} as constructor, and adds test
Fix radix character, adds test
Add the license to README

The license for this software was hidden in the comment of the JS
file. It should be easier to find, so I put it in the README.
Merge pull request #609 from amire80/master

It makes sense to have our license in the README as well as in the main file.
Remove mention of JSHINT.report()

We removed JSHINT.report() in f74fc3292e8960010fd7240df8986a6719ea7ef7
but forgot to kill it from the docs.
Merge pull request #608 from goatslacker/char

Fix character positions.

This patch fixes character positions reported by JSHint
in its warnings. Useful for fixmyjs and other programs
that rely on such data.
Set default value for 'lines' on each run.

JSHint has a lot of state variables that are shared between runs.
We need to re-assign default values to some of them on each run
so that they don't screw up anything.

One particular bug (GH-615) happened because 'warning' needed
a variable named 'lines' that was not defined yet. Tests didn't
catch that bug because there 'lines' was defined in previous
test cases (no isolation in our testing framework whatsoever).

Fixes GH-615.
Make JSHINT.data().unused be consistent with option.unused

JSHINT.data().unused is a legacy array that were kind of broken.
Lots of warnings were pointing to the parent function and generated
lots of false positives.

This patch makes option.unused to populate that array meaning
that JSHINT.errors and JSHINT.data().unused will have the same data
when it comes to unused variables.

This patch removes one property from JSHINT.data().unused so
scripts may break.

Fixes GH-610.
Make 'unused' check smarter about unused arguments.

This patch modifies 'unused' checks so that they ignore arguments
that were never used but that were followed by used arguments. For
example:

    function one(a, b) {
        return b;
    }

In this example, since unused 'a' is followed by used 'b', JSHint
assumes that this is a backwards compatibility issue or a specific
API pattern and suppresses the warning.

But this example, on the other hand, will generate a warning for 'b'
because there is no reason to keep it around:

    function one(a, b) {
        return a;
    }

References:

    Closes GH-607
Add support for parens outside of IIFE.

This patch simply removes a nitpicking warning about whether one
should put parens on the inside of IIFE or the outside.

Closes GH-470
Don't enable newcap for strict mode if it was explicitly disabled.

JSHint turns on 'newcap' for strict mode because there accessing
unbound 'this' throws an error. However, if someone explicitly
turned off 'newcap' we shouldn't force it back. Just assume that
the person tweaking these option knows better.

Closes GH-438.
Allow excluding globals

If I want to allow browser but I don't want anyone to use setInterval,
for example, you should be allowed to do this.

This allows the following syntax:

    /*jshint undef: true */
    /*global -event */

    event.hello(); // Warning

And:

    JSHINT('event.hello()', {
        browser: true,
        predefs: ['-event']
    }) === false;

Tickets:

    Closes GH-566
    Closes GH-562

Squashed commit of the following:

commit db51992aff1023a760d691d299214d9c711eb3ad
Merge: 21ba612 ca001d8
Author: Anton Kovalyov <anton@kovalyov.net>
Date:   Thu Aug 16 21:01:42 2012 -0700

    Merge branch 'gh-562-3' of git://github.com/goatslacker/jshint into goatslacker-gh-562-3

    Conflicts:
    	jshint.js
    	tests/unit/options.js

commit ca001d8e33f3c498610d243e707f8e4336459181
Author: Josh Perez <josh@goatslacker.com>
Date:   Tue Jun 26 20:14:58 2012 -0700

    Adds exclusion syntax to predefs in options

commit 0041ccba4619dc33a50d0b4dd78381d83b1e94ec
Author: Josh Perez <josh@goatslacker.com>
Date:   Tue Jun 26 20:08:51 2012 -0700

    Adds exclude function to global directive
Add support for labeled and lonely blocks.

This patch adds support for labeled and lonely blocks which
are valid according to ECMA-262. The following cases are
tested and supported:

    aLabeledBlock:
    {
        // Labeled block
    }

    {
        // Unlabeled block
    }

This fix also prevents the parser from halting when errors
are present in statements after which a block is expected (e.g.
if-statements).

For example, the following will report error, but not halt parsing
with `Expected '(end)' and instead saw '}'.` which it did before,
due to the first { not being taken in to account, and the
bracket-matching would fail:

    if (a < b); {
        // Bad if-statement
    }

Issues:

Closes GH-603.

Squashed commit of the following:

commit 2eb909c1e20f3e581b0cf520c6cf9ede5620adf8
Merge: 38fe2c9 d211d34
Author: Anton Kovalyov <anton@kovalyov.net>
Date:   Thu Aug 16 21:32:42 2012 -0700

    Merge branch 'master' of git://github.com/CarlEkerot/jshint into CarlEkerot-master

commit d211d3429375ce3bb1a907d33934e5303fcfe2bc
Merge: f5ea569 a1d7a7d
Author: CarlEkerot <carl.ekerot@lunicore.se>
Date:   Mon Aug 13 10:16:10 2012 +0200

    Merge remote branch 'upstream/master'

commit f5ea56953d2fbc0425b086bde553808d581b6465
Author: CarlEkerot <carl.ekerot@lunicore.se>
Date:   Thu Aug 2 08:41:44 2012 +0200

    Added assertions to ensure that code execution procedes after lonely blocks, and that start-bracket errors doesn't halt the parsing.

commit 2d65d8ad4dcb9eb1cc7078f72b34b0eec20d13cb
Merge: 8d4f985 03c8ee6
Author: CarlEkerot <carl.ekerot@lunicore.se>
Date:   Wed Aug 1 11:53:39 2012 +0200

    Merge branch 'master' of https://github.com/CarlEkerot/jshint

commit 8d4f985e334cfdf41b840cacf20ab90b255fa1dc
Author: CarlEkerot <carl.ekerot@lunicore.se>
Date:   Wed Aug 1 11:13:21 2012 +0200

    Removed commented addError-calls in parser.js.

commit e608f03c7173e57fc3d2d07645977ad70e44505e
Author: CarlEkerot <carl.ekerot@lunicore.se>
Date:   Wed Aug 1 11:04:19 2012 +0200

    Fix for issue #565. Makes blocks a special case of statements. This fix also prevents jshint from crashing due to unmatched curly-brackets in many cases (such as 'expected {, was (end)' in tests/unit/fixtures/comma.js)

commit 03c8ee690828985510498575f07397344658d693
Author: Carl Ekerot <kalle@implode.se>
Date:   Wed Aug 1 11:13:21 2012 +0200

    Removed commented addError-calls in parser.js.

commit 7550336e5fdcedecd5cdbc3f78d053b634871b6e
Author: Carl Ekerot <kalle@implode.se>
Date:   Wed Aug 1 11:04:19 2012 +0200

    Fix for issue #565. Makes blocks a special case of statements. This fix also prevents jshint from crashing due to unmatched curly-brackets in many cases (such as 'expected {, was (end)' in tests/unit/fixtures/comma.js)
Don't generate false positives on /* inside comments.

JSHint used to attempt to detect nested multiline comments but
that generated too many false positives:

    /**
     * To use bla.js provide path: bla("./*");
     */

In addition to that, nested multiline comments will error early
no matter what so there is no need for JSHint to warn about them:

    /*
     * /* Nested comment */
     */

So I just removed that check.

References:

Closes GH-540
Closes GH-599
Add a shim for Array.prototype.indexOf

Apparently, whatever JavaScript engine WSH uses, it doesn't support
Array.prototype.indexOf method so I had to add a shim for it. I took
the original version from MDN and modified it to pass our lint tests.

Closes GH-617.