github jshint/jshint 2.5.0
JSHint 2.5.0

latest releases: 2.13.6, 2.13.5, 2.13.4...
10 years ago

Yesterday, we pushed a new version of JSHint. We decided to label it 2.5.0 because—while it's backwards compatible—there are a few major changes.

The following options were removed: nomen, onevar, passfail, white, gcl, smarttabs, trailing. In addition to that, indent no longer provides warnings about indentation levels. You can still use it to set your tab-width but it will be used only for character locations in other warnings. JSHint won't error if you have these options in your config or your files; it will simply ignore them.

Thanks to our contributors, we fixed a lot of bugs in our parser. We also improved our ES6 support by adding basic support for template literals.

Plugin authors will be happy to know that we added a filename flag to our CLI program. It allows editors to pass code from stdin but pretend that it came from a while (useful for discovering directory-specific configuration files).

When running with asi option turned on, JSHint will now warn about unsafe constructions like this one:

// This code raises a TypeError instead of printing Hello, World followed
// by 1, 2 and 3.
console.log("Hello, World")
[1, 2, 3].forEach(function (n) { console.log(n) })

There shouldn't be any false positives. In fact, yesterday before shipping I removed some of the checks because they were generating false positives. (As a side note, it's nice to have a large code-base with no semicolons around to test pre-releases on before pushing them live)

We also fixed a couple of bugs that prevented ignore:line construct from working correctly with unused and undef options.

And yesterday we added a new experimental feature to JSHint configuration files. You can now specify different options on a per-directory or even per-file basis:

{
  "unused": true,
  "undef": true,

  "overrides": {
    "test/*": { "unused": false, "mocha": true }
  }
}

Note that this version is experimental so the syntax and stuff might change.

Don't miss a new jshint release

NewReleases is sending notifications on new releases.