WARNING: This release introduces backwards incompatible changes.
JSHint 2.0.0 is out! This version hits a pretty big milestone for the project: this is the first JSHint release for which I'm not the biggest contributor. I personally believe this fact validates JSHint as a successful open source project. And I'm extremely thankful to all you who file bug reports and send patches—you're all awesome.
The first and foremost: starting with this version JSHint will assume ES5 as
the default environment. Before, JSHint was checking all the code per ES3
specification with an option to enable ES5 mode. Now ES5 mode is the default
mode and if you want to check your code against the ES3 specification (useful
when developing for super old browsers such as Internet Explorer 6) you will
have to use es3:true
.
Special thanks to Rick Waldron for championing this change.
Thanks to our newest core contributor, Bernard Pratz, JSHint now has partial
support for Mozilla JavaScript extensions (moz
option) and ES6 (esnext
option):
const
let
blocks and expressionsfor ... of
loopsWe have more patches in queue that add support for classes and other nifty ES6 things. Stay tuned!
.jshintrc
in the directory being linted.
(#833)smarttabs
now ignores mixed tabs and spaces within single-
and multi-line comments.Added a new pragma to unignore a warning:
/jshint -W096 /
// All warnings about keys producing unexpected results will // be ignored here.
/jshint +W096 /
// But not here.
JSHint now ignores unrecognized JSLint options.
indent:false
was triggering indentation warnings.
(#1035)unused
was not behaving correctly.
(#996)And last but not least: starting with this version, I'm switching JSHint to a more rapid release schedule. This simply means that I will be publishing new versions of JSHint more often. I will try my best to follow semver recommendations and ship working software. But as our license says, no guarantees.
Thanks to Bernarnd Pratz, Michelle Steigerwalt, Yuya Tanaka, Matthew Flaschen, Juan Pablo Buritica, Matt Cheely, Steve Mosley, Stephen Sorensen, Rick Waldron, Hugues Malphettes, Jeff Thompson, xzyfer, Lee Leathers, croensch, Steven Benner, James Allardice, Sindre Sorhus, Jordan Harband, Stuart Knightley and Kevin Locke for sending patches!