Skip to content

Releases: jshint/jshint

JSHint 2.5.2

05 Jul 16:53
Compare
Choose a tag to compare

Another mostly bug fix release.

New stuff:

  • @paul-wade added a new option, * enforceall*, that automatically enables all enforcers making JSHint as strict as possible. See #1348 for more info.
  • @caitp improved our ES6 support by implementing export * from ... syntax and grouped fat-arrow expressions.

Thanks all. Special shout out to @rwaldron for everything.

JSHint 2.5.1

16 May 04:24
Compare
Choose a tag to compare

This is mostly a bug fix release.

One new feature: you can now override any or all globals values by explicitly specifying them in the extending configuration. Examples:

./.jshintrc

{
  "undef": true
}

./test/.jshintrc

{
  "extends": "../.jshintrc",
  "globals": {
    "suite": true,
    "test": true,
    "setup": true,
    "teardown": true,
    "assert": true
   }
}

./test/client/.jshintrc

{
  "extends": "../.jshintrc",
  "browser": true,
  "globals": {
    "define": true
  }
}

./test/server/.jshintrc

{
  "extends": "../.jshintrc",
  "node": true
}

JSHint 2.5.0

02 Apr 18:56
Compare
Choose a tag to compare

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.

JSHint 2.4.4

21 Feb 02:16
Compare
Choose a tag to compare
  • Version 2.4.4 (Anton Kovalyov)
  • Issue #1542: Use exit module instead of process.exit. Fixes #1541 and #1408. (Aaron Qian)
  • Strip leading whitespace from JavaScript code blocks extracted from HTML (Gleb Bahmutov)
  • Issue #1512: Add importClass and Packages to the Rhino env (Sven Dahlstrand)
  • Issue #1511: Add new constructs to the ES6 import syntax (Jakub Sedlacek)
  • Issue #1506: Replace process.stdout.write with console.log (Markus Wolf)
  • Issue #1504: ES6 module exports should not count as unused (Jacob Gable)
  • No issue: remove message about the 'es5' option. (Anton Kovalyov)
  • Issue #1494: Followup to add readFully as a global (Anton Kovalyov)
  • Issue #1494: Add support for the Nashorn JavaScript engine (Anton Kovalyov)
  • No issue: fix tests to respect Too Many Errors and Unrecoverable Syntax Error situations (Anton Kovalyov)
  • No issue: don't filter by (error) in tests. (Anton Kovalyov)
  • No issue: Show build status for 2.x instead of master (Anton Kovalyov)
  • Issue #1491: Parenthesis in odd-numbered token is ignored before arrow function (arai)
  • No issue: removed what seems to be useless and incorrect block of code (Anton Kovalyov)

JSHint 2.4.3

26 Jan 03:32
Compare
Choose a tag to compare
  • Version 2.4.3 (Anton Kovalyov)
  • Fixed #1311: Add support for destructuring function parameters (PR #1450) (arai)
  • No issue: change message for W104 (Anton Kovalyov)
  • Issue #1456: New option - nonbsp (PR #1458) (Nikolaus Piccolotto)
  • No issue: tabs to spaces (Anton Kovalyov)
  • Issue #1453: Handle single-line comments for block ignore (PR #1454) (eric thul)
  • Treat leading slash as relative to the current dir for consistency with .gitignore (Joshua Spence)
  • Issue #1425: Add 'unknown' to the list of valid typeof values (Anton Kovalyov)

JSHint 2.4.2

21 Jan 19:26
Compare
Choose a tag to compare
  • Version 2.4.2 (Anton Kovalyov)
  • Issue #1464: Correctly fix #1282 (relaxing maxlen for comments) (Julien Wajsberg)
  • Issue #1460: Fixed a typo in messages.js (SheetJS)
  • Issue #1477: Add matchMedia to the browser list of globals (Anton Kovalyov)

JSHint 2.4.1

03 Jan 21:04
Compare
Choose a tag to compare

This is a minor release fixing a couple of regressions and relaxing the yield check by introducing a new option, noyield.

  • Version 2.4.1 (Anton Kovalyov)
  • Issue #1123: Make checks for generator functions without yield optional (Mark S. Everitt)
  • Issue #1451: Fix a regression caused by #1388 (Julien Wajsberg)
  • Issue #1449: Check for hasOwnProperty when iterating through tokens (Robin Ward)
  • Issue #1439: Make extend option to overwrite in the right direction (Mike Sherov)
  • Issue #1433: Remove overzealous W092 (Nikhil Benesch)

JSHint 2.4.0 is released

25 Dec 01:57
Compare
Choose a tag to compare

This is a relatively big release that adds a couple of new features, fixes a lot of bugs and improves our ES6 support. I will update documentation and write a blog post about the release later this week, after the Christmas day.

  • Version 2.4.0; Holidays edition (Anton Kovalyov)
  • Issue #1363: Don't consider => params as undefined vars (Anton Kovalyov)
  • Issue #1388: Warn about missing 'use strict' in files w/o funcs (Anton Kovalyov)
  • Issue #1394: Allow var variables to shadow let variables. (Anton Kovalyov)
  • Issue #1367: Make 'funcscope' recognize try/finally blocks as well (Anton Kovalyov)
  • Issue #1242: Make unused option recognize constants. (Anton Kovalyov)
  • Issue #1349: Remove var window from browserified files (Anton Kovalyov)
  • Issue #1364: Make exported and global directive work together better (Anton Kovalyov)
  • Issue #1362: Make sure 'let' variables are not treated as globals on assignment (Anton Kovalyov)
  • Issue #1350: Upgrade Browserify to 3.12 (Anton Kovalyov)
  • Issue #1375: Make sure _.zip always receives an array (Anton Kovalyov)
  • Issue #1378: Escape special characters for better output (Anton Kovalyov)
  • Issue #1431: Check whether this.right exists when parsing ++ (Anton Kovalyov)
  • Issue #350: Make shadow check for outer scopes as well (Oleg Grenrus)
  • Issue #1426: Make some Node globals writeable. Props to @Raynos (Anton Kovalyov)
  • Issue #1415: Implement exclude-path to pass custom .jshintignore files (Raynos (Jake Verbaten))
  • Issue #1391: Handle malformed package.json file (icebox)
  • Issue #1417: Set inscript default to false to prevent false-positives (BenoitZugmeyer)
  • Issue #1371: Move character val to end of '!=' or '==' (James Beavers)
  • Issue #1374: Prevent false positives on concise methods. (Travis Kaufman)
  • Issue #1352: Add an flag to extract JavaScript from HTML. (Anton Kovalyov)
  • Fixed #1380: Add canvas related globals to 'browser' (Ben Alpert)
  • Fixed #1314: Allow extending .jshintrc with 'extends'. (Spencer Alger)
  • Fixed #1282: Relax maxlen option in some situations. (Julien Wajsberg)
  • Fixed #1360: Use getOwnPropertyDescriptor to prevent failures on props like __proto__ (Anton Kovalyov)
  • Fixed #1376: Export JSHINT using require from the browserified version. (Christopher Hunt)
  • Fixed #1286: Make surrounding parens silence boss errors in return stmt (Julien Wajsberg)
  • No issue: Fixed test command in CONTRIBUTING.md (Anton Kovalyov)
  • Fixed #1324: Make sure we're not mutating passed options object. (Anton Kovalyov)
  • No issue: minor refactoring (Anton Kovalyov)
  • Fixed #1335: Changed message for W057 (Pamela Fox)
  • Fixed #1334: fix a typo in the description of E027 (Pamela Fox)

JSHint 2.3.0 is released

21 Oct 01:42
Compare
Choose a tag to compare

This release fixes a couple of bugs and adds new checks and options.

  • Version 2.3.0; Las Vegas to San Francisco edition (Anton Kovalyov)
  • Fixed #1252: Add an option to warn about overwriting native objects. (Caitlin Potter)
  • Fixed #1293: Make latedef=nofunc ignore inner functions. (Jared Jacobs)
  • Fixed #1243: Detect comparisons with 'typeof x' and check the other operand. (Oleg Grenrus)
  • Fixed #1305: Removed unused code from checkstyle.js (Anders Janmyr)
  • Fixed #1253: Limit parseInt radix check to ES3 only. (Artem Nezvigin)
  • No issue: new release dist files (Anton Kovalyov)

Docs to follow soon.

JSHint 2.2.0 is released

18 Oct 17:31
Compare
Choose a tag to compare

This release introduces bug fixes and general improvements. In addition to that, JSHint now allows you to ignore parts of the file or specific line using the special /*jshint ignore */ directive. See #826 and #870 for more information.

Changelog

  • Version 2.2.0 (Anton Kovalyov)
  • Fixed #1209: Make 'camelcase' ignore trailing underscores. (Nikas Praninskas)
  • Fixed #1277: Special treatment for 'new this()' (Dario Sneidermanis)
  • Fixed #826, fixed #870: Add jshint ignore directive (Daniel Miladinov)
  • Fixed #1221: Add 'globals' to the valOptions list (willhlaw)
  • Fixed #858: Allow 'break' and blocks in switch cases. (Szu-Yu Chen (Aknow))
  • No issue: added text about JSHint 3 (Anton Kovalyov)
  • Fixed #1298: Add data/ directory to the NPM package whitelist (imkira)
  • Fixed #1287: Add URL global to the browser environment (Anton Kovalyov)
  • Make #!/usr/bin/env node imply node:true (Rob Wu)
  • Fixes #935: Detect the switch indentation style and use that. (Anton Kovalyov)
  • Fixed #1297: Improve Unicode support in the identifier parser (Mathias Bynens)
  • No issue: track dist/ directory. (Anton Kovalyov)