Commits on Aug 15, 2017
  1. [[FIX]] Do not create binding for illegal syntax

    When a function declaration without an identifier is encountered, JSHint
    issues a warning and attempts to continue parsing the declaration.
    Previously, JSHint created a new binding for the "function" keyword, and
    because such a binding can never be referenced, this would generate
    spurious warnings when the "unused" option was enabled.
    Do not create a faulty binding in the presence of this syntax error.
    jugglinmike committed with rwaldron Aug 12, 2017
Commits on Jul 17, 2017
  1. [[FIX]] Allow computed method names in obj literal

    jugglinmike committed with rwaldron Jul 16, 2017
Commits on Jul 12, 2017
  1. [[FIX]] Correct location reported for W043

    In addition, do not emit the E029 error. Maintain the error code itself
    to replace with W043 in a future release.
    jugglinmike committed with rwaldron Jul 1, 2017
Commits on Jun 22, 2017
  1. v2.9.5

    jugglinmike committed Jun 22, 2017
  2. Merge branch 'W083'

    jugglinmike committed Jun 22, 2017
  3. [[TEST]] Update tests to reflect new W083 language

    Signed-off-by: Rick Waldron <>
    rwaldron committed with jugglinmike Jun 22, 2017
  4. [[TEST]] Less ambiguous message for W083

    commit d2152a9e59df9b03e43ff3f4db2ce2e2fc345a35
    Author: Oliver Scase <>
    Date:   Wed Nov 23 20:41:38 2016 +0000
        Fixed line length of WO83
    commit 82dfcc078f6c4e5faf21361b441957b578e1b7b0
    Author: oliver <>
    Date:   Fri Nov 4 10:23:27 2016 +0000
        less ambiguous message for W083
    Signed-off-by: Rick Waldron <>
    iamlikeme-x committed with jugglinmike Jun 22, 2017
Commits on May 6, 2017
  1. [[CHORE]] Update Test262

    jugglinmike committed May 6, 2017
  2. [[CHORE]] Fix bug in test script

    Avoid using `process.exit` in order to ensure that all output is written
    prior to process termination. From the Node.js documentation:
    > Rather than calling process.exit() directly, the code should set the
    > process.exitCode and allow the process to exit naturally by avoiding
    > scheduling any additional work for the event loop:
    >     // How to properly set the exit code while letting
    >     // the process exit gracefully.
    >     if (someConditionNotMet()) {
    >       printUsageToStdout();
    >       process.exitCode = 1;
    >     }
    > If it is necessary to terminate the Node.js process due to an error
    > condition, throwing an uncaught error and allowing the process to
    > terminate accordingly is safer than calling process.exit().
    jugglinmike committed May 6, 2017
Commits on May 3, 2017
  1. Merge pull request #3126 from jugglinmike/for-lhs

    [[FIX]] Parse `for-in/of` head LHS as asnmt target
    rwaldron committed on GitHub May 3, 2017
Commits on Apr 30, 2017
  1. [[FIX]] Parse `for-in/of` head LHS as asnmt target

    Previously, the left-hand side of the `for-in/of` head re-used the code
    path for `var` declaration lists. This was undesirable for a number of
    - it made the `var` statement's parsing logic more complex
    - it tended to produce inaccurate error messages, e.g. "destructuring
      binding is available in ES6"
    - it disallowed syntactically valid code, e.g. `for (a.b in {}) {}` or
      `for ([x[y]] of []) {}`
    Refactor the parsing logic of `for-in/of` heads to more faithfully match
    the actual language grammar. Update the expected errors in the project's
    unit test suite according to the more accurate messages that this change
    produces.  Simplify `var` statement parsing logic by removing the code
    intended to support this condition. Maintain support for initializers
    and the comma operator in order to improve error messages in the case of
    common programming mistakes.
    jugglinmike committed Apr 23, 2017
Commits on Apr 29, 2017
  1. [[FEAT]] Add MediaRecorder to vars.js

    MediaRecorder is new API for recording media from user - audio and
    pcmanik committed with jugglinmike Apr 26, 2017
Commits on Apr 25, 2017
  1. Merge pull request #3066 from jugglinmike/asi-dowhile-es6-updated

    [[FIX]] Throw W033 instead of E058 when the ; after a do-while stmt is missing (continued)
    rwaldron committed on GitHub Apr 25, 2017
  2. Merge pull request #3064 from jugglinmike/improve-yield-messages

    [[DOCS]] Improve `yield`-related messages
    rwaldron committed on GitHub Apr 25, 2017
  3. [[FIX]] Avoid crash when peeking past end of prog

    The internal `peek` function may be used to request tokens beyond the
    end of the program. Because multiple call sites expect the function to
    consistently return an object value, the "end of program" token is be
    returned in these cases.
    However, this situation may occur in cases where the "end of program"
    token is not the next token. The previous implementation of the function
    would produce the `null` value in this event, violating callers'
    expectation and resulting in runtime reference errors.
    Update the internal `peek` function to consistently return the "end of
    program" token when input has been exhausted--even when this is not the
    next token.
    jugglinmike committed with rwaldron Nov 12, 2016
  4. [[FIX]] Close synthetic scope for labeled blocks

    JSHint creates a synthetic block scope in order to track labeled
    statements prior to parsing the statements themselves. Previously, this
    scope was not closed (or "unstacked") for labeled Block statements.
    Ensure that the synthetic scope is closed in these cases as well. Assert
    correct behavior via various parsing/linting mechanisms that are aware
    of scope.
    jugglinmike committed with rwaldron Oct 30, 2016
  5. Merge remote-tracking branch 'jugglinmike/2358-improve-unused-desc'

    * jugglinmike/2358-improve-unused-desc:
      [[DOCS]] Improve description of `unused` option
    rwaldron committed Apr 25, 2017
Commits on Apr 23, 2017
  1. [[FIX]] Account for hoisting of importing bindings

    Bindings created via ES2015 `import` declarations are "hoisted"
    during module instantiation. This enables reference prior to
    declaration, though JSHint previously reported an error for such cases.
    Remove the restriction by introducing a new binding type, "import", that
    is interpreted as hoisted and (unlike the existing "function" type)
    Extend the enforcement of the "latedef" linting option (which previously
    only concerned function declarations) to warn about imported bindings
    referenced prior to declaration. Although this a new warning, it is
    backwards-compatible because it only occurs in situations that were
    previously reported as errors.
    jugglinmike committed Apr 23, 2017
Commits on Apr 17, 2017
  1. Correct a few bugs in escape sequence parsing (#3120)

    * [[FIX]] Disallow strict mode OctalEscapeSequence
    * [[FIX]] Detect invalid UnicodeEscapeSequences
    jugglinmike committed with rwaldron Apr 17, 2017
Commits on Apr 13, 2017
  1. [[FIX]] Removed warning message W041 (#3115)

    * [[FIX]] Removed warning message W041
    This commit removes the warning message W041 altogether from the jshint
    Fixes #3109
    * [[FIX]] Removed warning message W041
    This commit removes the warning message W041 and the corresponding
    assertions from junits.
    Fixes #3109
    sunilkumarc committed with rwaldron Apr 13, 2017
Commits on Apr 3, 2017
  1. [[FEAT]] Add enforcing option: `trailingcomma` (#3090)

    Missing trailing commas in array and object literals can result in
    undetectable visual ambiguities--the same visual ambiguities that lead
    to bugs when a programmer relies on automatic semicolon insertion.
    Therefore, it might be a good practice to always use them, so this
    option provides warnings in their absence.
    For example, this code might have worked last Tuesday:
            b + c
    But if one adds an element to the array and forgets to compensate for
    the missing comma, no syntax error is thrown, and a linter cannot
    determine if this was a mistake or an intentional function invocation:
            b + c
            (d + e)
    If one always appends a list item with a comma, this ambiguity cannot
            b + c,
            b + c,
            (d + e),
    If this option is `true`, a warning will be thrown if a "," does not
    occur before the closing "]" or "}" in an array or object literal. If
    option `es3` is also `true`, this option does nothing, because otherwise
    the options would contradict each other, and the `es3` mandate is more
    There is no inverse of this option, that would warn if an ES5 programmer
    omitted a trailing comma. Omission of a trailing comma in ES5 provides
    no benefit, unlike option `trailingcomma`, which actually helps prevent
    bugs. Such an inverse feature would be considered "stylistic;" do not
    confuse `trailingcomma` as a "style" option, as it is no more
    "stylistic" than the default detection of semicolons is.
    jugglinmike committed with rwaldron Apr 3, 2017
  2. [[FIX]] Fail gracefully on invalid `if` syntax (#3103)

    jugglinmike committed with rwaldron Apr 3, 2017
  3. Esversion normalization (#3054)

    * [[CHORE]] Refactor linting directive logic
    Rename the internal `doOption` function to `lintingDirective` in order
    to better reflect its purpose. Move the logic dedicated to processing
    the "falls through" directive into this function.
    * [[CHORE]] Rename internal function
    * [[FIX]] Normalize interpretation of `esversion`
    Ensure that configurations containing either `esversion: 6` or
    `esversion: 2015` have identical effects, whether specified via an
    in-line directive, an RC file, or the programmatic API.
    * fixup! [[CHORE]] Refactor linting directive logic
    * fixup! [[CHORE]] Refactor linting directive logic
    jugglinmike committed with rwaldron Apr 3, 2017
Commits on Mar 18, 2017
  1. [[CHORE]] Improve continuous integration config

    Limit the "browser" test target to the latest version of Node.js only,
    and ensure it is run on the Windows-based CI system as well as the
    Linux-based CI system.
    jugglinmike committed Mar 18, 2017
  2. [[CHORE]] Update browser testing infrastructure

    Update the Node.js dependencies used to run automated browser tests.
    jugglinmike committed Mar 18, 2017
  3. [[TESTS]] Run Test262 tests in Windows CI env.

    Because the Test262 test suite is already being linted in the
    Linux-based CI environment, and because it does not involve the use of
    JSHint's command-line interface, this change is unlikely to uncover
    novel bugs in JSHint itself. However, this configuration helps prevent
    workflow regressions for Windows-based contributors.
    jugglinmike committed Mar 18, 2017
Commits on Feb 26, 2017
  1. [[CHORE]] Correct typo

    jugglinmike committed Feb 26, 2017
Commits on Feb 25, 2017
  1. Merge pull request #3098 from jugglinmike/test262

    [[TEST]] Run Test262 tests
    caitp committed on GitHub Feb 25, 2017
Commits on Feb 19, 2017
  1. [[TEST]] Run Test262 tests

    Include the Test262 project as a submodule and introduce a new test
    script that attempts to parse every test file it contains. Because this
    project currently fails a number of valid tests with both type I and
    type II errors, include a text file temporarily white-listing those
    Managing the Test262 project repository as a git submodule is somewhat
    cumbersome for general development, so do not integrate this test in the
    default `npm test` command.
    jugglinmike committed Oct 20, 2016
Commits on Feb 5, 2017
  1. [[FIX]] Added missing "Storage" browser variable

    This variable is available globally in browsers, and can be used to
    override the behaviour of localStorage & sessionStorage.
    code-tree committed with jugglinmike Feb 27, 2016
Commits on Jan 28, 2017
  1. [[DOCS]] Remove outdated users

    These links no longer reference the organizations they originally
    described and should therefore be removed from the project
    jugglinmike committed Jan 28, 2017
Commits on Jan 8, 2017
  1. [[CHORE]] Add test for previous commit

    jugglinmike committed Jan 8, 2017
Commits on Jan 7, 2017
  1. [[DOCS]] Fix typo

    jugglinmike committed Jan 7, 2017