New Release: 2.9.0

Note This release was revoked shortly following its publication. Please refer to the release notes for version 2.9.1 for more information (found in the project's CHANGELOG.md file and on the project's website).

This release was a long time in the making, but it may not be the most exciting version we've published. Most of the changes are internal refactorings that were necessary to properly fix bugs. And fix bugs we did! Special thanks go to Luke Page, the newest addition to the JSHint team. Luke is a maintainer of the Less CSS project, and he introduced himself to use by overhauling JSHint's variable tracking logic.

JSHint 3.0 is closer than ever. We're excited for the opportunity to break a few things in order to make real strides forward. In fact, the hardest part will be limiting ourselves (we don't want to make migrating to the new version onerous). If you have any ideas along these lines, please submit them on the project's issue tracker. We'll mark them with the label "Breaking Change", and as we decide what's definitely "in" for 3.0, we'll add them to the "v3.0.0" milestone.

Bug Fixes

  • Add HTMLCollection to browser environment. (e92d375), closes #2443
  • Add window.performance to browser vars (3ff1b05), closes #2461
  • Allow __proto__ when using ES6 (06b5764), closes #2371
  • Allow binary and octal numbers, and templates when using inline esnext (b5ba7d6), closes #2519
  • Allow default values in destructuring. (04ace9a), closes #1941
  • Allow destructuring in catch blocks parameter (759644c), closes #2526
  • Allow latedef in the initialiser of variable (18f8775), closes #2628
  • Allow line breaking after yield if asi: true (728c84b), closes #2530
  • Allow non-identifier PropertyNames in object destructuring. (aa8a023), closes #2467
  • Allow object destructuring assignment (ae48966), closes #2269
  • Allow semicolon as string value in JSON (ab73e01)
  • block scope vars dont redefine in blocks (9e74025), closes #2438
  • Catch blocks are no longer functions (8a864f3), closes #2510
  • Change imported variables to be constants (94a6779), closes #2428
  • Classes are not hoisted (87378cc), closes #1934
  • Correct exported AssignmentExpressions (282b40e)
  • Correctly parse empty destructuring (97c188b), closes #2513
  • Correctly parse exported generators (0604816), closes #2472
  • Declare func as a property of state (3be8d36)
  • default params can't reference future arg (bc2741c), closes #2422
  • Define "build" module (2f98f91)
  • Define npm scripts for each test suite (5c33ded)
  • Do not accept empty values for directives (a5bfefb)
  • Do not crash if the forin check is block (d1cbe84), closes #1920
  • Do not mark ignore directives as special (f14c262)
  • Do not parse arrays which contain for as array comprehensions. (d70876c), closes #1413
  • Don't crash on uncomplete typeof expression (a32cf50), closes #2506
  • Don't warn when Array() is used without 'new'. (5f88aa7), closes #1987
  • Dont crash when testing x == keyword if eqnull is on (6afd373), closes #2587
  • Dont warn twice in var redeclaration (e32e17b)
  • handle no 'home' environment variables (946af3e)
  • Honor ignore directive more consistently (0971608)
  • Ignore directive should ignore max line length for comments (f2f871a), closes #1575
  • Immediately-invoked arrow funcs' param doesn't need parentheses (d261071), closes #2351
  • Improve support for __proto__ identifier (925a983)
  • It is not un-necessary to assign undefined in a loop (e8ce9bf), closes #1191
  • labeled break and continue semantics (da66f70)
  • Labels shadowing within a function is a syntax error (124e00f), closes #2419
  • Load JSHint from package root (92acdd1)
  • Make strict: func have precedence over env options. (d138db8)
  • Param destructuring should not effect max params (9d021ee), closes #2183
  • Params cannot always have the same name (9f2b64c), closes #2492
  • Prevent regressions in bug fix (477d3ad)
  • Regular args can come after args with default (f2a59f1), closes #1779
  • Relax restriction on module option (56c19a5)
  • Remove bad error E048 in for loop init (a8fc16b), closes #1862
  • Remove module import declaration (1749ac0)
  • Report an error when a necessary semicolon is missing (45d8e3e), closes #1327
  • report line numbers of destructured params (7d25451), closes #2494
  • Report loopfunc for all function types (4d4cfcd), closes #2153
  • singleGroups: Allow grouping for integers (8c265ca)
  • Support new.target (2fbf621)
  • The __iterator__ property is deprecated. (7780613)
  • Unify assign operation checks. (06eb1d2), closes #2589
  • use of params is not capturing loopfunc (827e335)
  • Warn about using var inside for (...) when varstmt: true (f1ab638), closes #2627

Features