Commits on Oct 12, 2012
  1. @valueof

    Copied CLI documentation from node-jshint

    Since we're merging all repos together I need to copy some docs so that we don't lose them forever.
    valueof committed Oct 12, 2012
Commits on Oct 9, 2012
  1. @valueof

    Two spaces instead of tabs in .travis.yml.

    Travis-CI thinks that we're a ruby project for some reason. Hopefully
    this will fix it.
    valueof committed Oct 9, 2012
  2. @valueof
  3. @valueof
  4. @valueof
  5. @valueof
  6. @valueof

    Moved NPM package (node-jshint) into the main repo.

    This commit moves JSHint NPM pacakge into this repo. This change
    will allow us to further support NPM package as a main wrapper
    around JSHint.
    To conform with other tests, I rewrote node-jshint tests using
    valueof committed Oct 2, 2012
Commits on Sep 29, 2012
  1. @valueof

    Swapped Grunt with ShellJS, fixed lint warnings.

    So I decided to swap Grunt with ShellJS for two reasons:
     1. Grunt still ships with JSHint 0.5.9
     2. I will need to write build commands in future and shelljs
        has nice helpers for that.
    In addition to that, I fixed all lint warnings in tests.
    valueof committed Sep 29, 2012
  2. @valueof
  3. @valueof

    Copied over JSHint Next source from jshint-next repo.

    All tests passed with minor path modifications!
    valueof committed Sep 29, 2012
  4. @valueof

    Ported all expresso tests to nodeunit

    Since we're merging projects we need just one tool for unit tests.
    I really like nodeunit so I ported all expresso tests to nodeunit.
    Also in this patch:
     * No more comma-first, even in tests.
     * Grunt instead of Make.
     * I removed all tests that were running JSHint against itself,
    	 we will use 'grunt lint' instead.
    valueof committed Sep 29, 2012
Commits on Sep 28, 2012
  1. @valueof

    Move files to the appropriate directories.

    This commit moves files to the appropriate directories and deletes
    obsolete ones. There is 100% chance that test the tree at this
    point is completely broken so if you find yourself at this commit
    move to the later one.
    valueof committed Sep 28, 2012
Commits on Sep 26, 2012
  1. @valueof

    Experiment to combine all JSHint repos into one.

    It is beneficial to have all JSHint-related projects under
    one repo. So I am starting this experiment to see how it
    goes. I will try to combine JSHint, JSHint Next and Node
    JSHint together into one happy program.
    valueof committed Sep 26, 2012
Commits on Sep 25, 2012
  1. @valueof

    Make 'indent' behaviour consistent.

    When 'indent' is used as a comment it implies 'white' option. (see
    L1973). This behaviour came to us as JSLint's legacy and is outside
    of scope of this commit. This commit simply makes it so the 'indent'
    option passed as an argument to JSHINT also implies 'white'.
    Fixes GH-655.
    valueof committed Sep 25, 2012
  2. @valueof

    Merge pull request #652 from bmharris/547_block_commented_code

    Fix for issue # 547 - // block comments on indented code
    valueof committed Sep 25, 2012
Commits on Sep 20, 2012
  1. @selfcontained

    // block comments allowed on indented code with smarttabs

    pull request for issue #547
    This update allows for the following if the smarttabs option has been enabled:
    	//[space]if(something) {
    ... which is the result of block commenting out the following code in some text editors:
    	if(something) {
    The smarttabs regex is now doing a negative look-behind for a "//" prior to a [space][tab], and allowing it in that case.
    Test cases have been updated to account for this addition as well.
    selfcontained committed Sep 16, 2012
Commits on Sep 16, 2012
  1. @valueof

    Added tests for YUI globals.

    YUI globals support was committed in
    225e653 and merged in without
    any tests. This patch fixes that.
    valueof committed Sep 16, 2012
  2. @valueof

    Fix a bug where maxparams was failing on functions with no parameters.

    verifyMaxParametersPerFunction expected the result of functionparams()
    to be always an array. This is a bad assumption because when there are
    no parameters, this function returns nothing.
    Just changing functionparams() to return empty array was breaking
    some ES5 parsing code so I decided to make
    verifyMaxParametersPerFunction to be aware of possible 'undefined'.
    Closes GH-642.
    valueof committed Sep 16, 2012
  3. @valueof

    Revert "Merge pull request #643 from medikoo/params-error"

    This reverts commit ac45bf0, reversing
    changes made to 4a0d7c6.
    Reason: no regression test submitted with a pull request.
    valueof committed Sep 16, 2012
  4. @goatslacker

    Merge pull request #643 from medikoo/params-error

    Fix functionparams result
    goatslacker committed Sep 16, 2012
Commits on Sep 12, 2012
  1. @medikoo

    Fix functionparams result

    It should be array in all cases.
    medikoo committed Sep 12, 2012
Commits on Sep 11, 2012
  1. @goatslacker

    Merge pull request #641 from davglass/yui

    Adding predefined YUI vars
    goatslacker committed Sep 11, 2012
  2. @davglass

    Adding predefined YUI vars

    davglass committed Sep 11, 2012
Commits on Sep 3, 2012
  1. @valueof

    Fixed a bug where new max* options were not recognized.

    So while publishing r11 I noticed that new max* options (maxparams,
    etc.) were not recognized when set using JSHint comments. That was
    because we forgot to update the code that checks for numeric values.
    This patch fixes that and adds a regression test (just in case).
    Will have to move r11 pointer to this commit instead of previous one.
    valueof committed Sep 3, 2012
  2. @valueof

    Better support for catch blocks.

    In JavaScript, 'catch' blocks should have their own scope--just like
    functions--but we used to treat them as an ordinary blocks meaning
    that their scope was combined with the outer function (or global).
    This patch changes that by treating catch blocks as anon functions
    with a special property '(catch)' that is 'true' only for catch
    blocks. This allows us to detect undefined variables better than
    before (see GH-247).
    In IE, however, variables from the catch scope can leak into the
    outer scope. We catch one such example (GH-618):
      var e = 2;
      try {
        throw 'boom';
      } catch (e) {
        // JSHint now warns that 'e' might get overwritten in IE.
      console.log(e + 2); // 'boom2' instead of 4
    Naturally, in 'node' environment this warning disappears.
    Closes GH-618.
    valueof committed Sep 3, 2012
  3. @valueof

    Break early when { is not followed by a number.

    When parsing regular expressions and encountering a '{' that is
    not followed by a number there is absolutely no reason to continue
    parsing it as if there was a number.
    Closes GH-538.
    valueof committed Sep 3, 2012
  4. @valueof

    Make our parser to be smarter about /= and regexs.

    The ridiculously long regular expression that produces tokens was
    confused about differences between '/=' and regular expressions that
    start with '='. Basically it didn't know that the latter exist.
    This patch fixes the problem using the simplest (but still dumb)
    solution. It makes sure that the token for /= is not followed by
    non-whitespace characters and '/[gim]'. I hope this will catch
    most regular expressions out there.
    Closes GH-536.
    valueof committed Sep 3, 2012
  5. @valueof
Commits on Sep 2, 2012
  1. @valueof

    Added JSON2 and Lodash to the regression library.

    I decided that we need more code samples for regressions to be
    confident that we don't break stuff while pushing new changes. So
    I added Lodash and JSON2 to our regression library.
    Also I combined individual test files into one file.
    Closes GH-632.
    valueof committed Sep 2, 2012
Commits on Aug 29, 2012
  1. @valueof

    Don't warn about "<\!--"

    In order to not get into trouble with the HTML parser, the strings
    such as "<!--" need to be escaped. In such cases escaping '!' is
    totally valid.
    Closes GH-499
    valueof committed Aug 29, 2012
  2. @valueof

    Add Blob to the list of browser globals

    Blob is a part of FileSystem API and since we already have FileReader
    in the list of browser globals why not add Blob? This global exists
    on my Firefox Beta (15).
    Closes GH-541.
    valueof committed Aug 29, 2012
  3. @valueof

    Don't warn about insecure ^ when regexp is set.

    This option was supposed to be only about insecure '.' and lots of
    people seem to thnk that warning about ^ is unwarranted.
    Closes GH-555.
    valueof committed Aug 29, 2012
  4. @valueof

    Don't warn when Object is used as a function.

    Like Boolean, Number, and String, Object can be called as a function,
    which provides scripts with access to ECMAScript's internal ToObject
    logic. If passed an object, return it. If passed a primitive, return
    a new Number, Boolean, or String as appropriate (or new Object for
    null/undefined). This is useful primarily when implementing shims for
    new ECMAScript functionality that is specified to use the ToObject
    internal method.
    Closes GH-392.
    valueof committed Aug 29, 2012
  5. @valueof

    Make NaN a built-in global and not a reserved word.

    NaN is not a reserved word according to the ES5 spec and treating it
    like one prohibits the use of (equally valid) Number.NaN.
      * List of ES5 reserved words:
      * Closes GH-286
    valueof committed Aug 29, 2012
  6. @Shutnik @valueof

    Don't warn about uncapitalized global functions used as constructors.

    This prevents JSHint from warning about the following case:
        var myFunc = function () {};
        var obj = new myFunc();
    There is not much harm in calling a normal function with 'new'.
    Shutnik committed with valueof Aug 29, 2012