ESLint v8.x reached end-of-life on 2024-10-05 and is no longer maintained. Upgrade or consider long-term support options

ESLint v2.5.0 released

We just pushed ESLint v2.5.0, which is a minor release upgrade of ESLint. This release adds some new features and fixes several bugs found in the previous release.

Highlights

This is a summary of the major changes you need to know about for this version of ESLint.

Node.js without OpenSSL Compatibility

Previously, the --cache feature was using the Node.js crypto module to calculate hashes of files to determine which files had changed. Because of this, ESLint wouldn’t work on Node.js compiled without OpenSSL. We changed the --cache feature to use a third-party hash function instead, allowing us to remove our dependency on the Node.js crypto module and ensure ESLint works fine for Node.js without OpenSSL.

Bundled Dependencies

This is the first version of ESLint that bundles its dependencies. Recent events have made it clear that for a development tool like ESLint, bundling dependencies makes a lot of sense. This will ensure a couple of things:

  1. That everyone using v2.5.0 of ESLint will be using the same dependencies, meaning that dependency updates won’t break a previously working ESLint version.
  2. We won’t fall victim to dependencies that were available at release time suddenly disappearing.

Bundling dependencies does mean that npm cannot dedupe ESLint dependencies upon installation, but as ESLint is a development tool only, we felt like this tradeoff was worth making to ensure that any given ESLint version that was validated to work at release time will continue to work for everyone no matter what.

New Rules

Features

  • d6f8409 New: Rule - No useless escape (fixes #5460) (Onur Temizkan)
  • 92d1749 New: max-statements-per-line (fixes #5424) (Kenneth Williams)
  • c289414 New: no-duplicate-imports rule (fixes #3478) (Simen Bekkhus)

Enhancements

  • 48ad5fe Update: Add ‘caughtErrors’ to rule no-unused-vars (fixes #3837) (vamshi)
  • d0ae66c Update: Allow autoconfiguration for JSX code (fixes #5511) (Ian VanSchooten)
  • 4b05ce6 Update: Enforce repo coding conventions via ESLint (refs #5188) (Kevin Partington)
  • 03037c2 Update: Overrides for space-unary-ops (fixes #5060) (Afnan Fahim)
  • 24d986a Update: replace MD5 hashing of cache files with MurmurHash (fixes #5522) (Michael Ficarra)

Bug Fixes

  • 7021aa9 Fix: lines-around-comment in ESLint repo, part 2 (refs #5188) (Kevin Partington)
  • aaf324a Fix: missing support for json sub configs (fixes #5413) (Noam Okman)
  • ad90c2b Fix: incorrect config message (fixes #5653) (s0ph1e)
  • 32748dc Fix: radix rule false positive at shadowed variables (fixes #5639) (Toru Nagashima)
  • 66db38d Fix: --no-ignore should not un-ignore default ignores (fixes #5547) (alberto)
  • 4b7305e Fix: Allow default ignored files to be unignored (fixes #5410) (Ian VanSchooten)
  • 9a22625 Fix: prefer-const false positive at non-blocked if (fixes #5610) (Toru Nagashima)
  • b1fd482 Fix: leading comments added from previous node (fixes #5531) (Kai Cataldo)
  • e94b77d Fix: Respect ‘ignoreTrailingComments’ in max-len rule (fixes #5563) (Vamshi Krishna)
  • 9289ef8 Fix: handle personal package.json without config (fixes #5496) (Denny Christochowitz)
  • 87d74b2 Fix: prefer-const got to not change scopes (refs #5284) (Toru Nagashima)
  • f405030 Fix: Ensure allowing await as a property name (fixes #5564) (Toru Nagashima)
  • aefc90c Fix: no-useless-constructor clash (fixes #5573) (Toru Nagashima)
  • cfc14a9 Fix: valid-jsdoc correctly checks type union (fixes #5260) (Kai Cataldo)
  • 689cb7d Fix: quote-props false positive on certain keys (fixes #5532) (Burak Yigit Kaya)
  • 167a03a Fix: brace-style erroneously ignoring certain errors (fixes #5197) (Burak Yigit Kaya)
  • 3133f28 Fix: object-curly-spacing doesn’t know types (fixes #5537) (fixes #5538) (Burak Yigit Kaya)
  • bc769ca Fix: Improve file path resolution (fixes #5314) (Ian VanSchooten)

Documentation

  • 095c435 Docs: Remove ES2016 from experimental section of README (Kevin Partington)
  • ea06868 Docs: Clarify --ext does not apply to globs (fixes #5452) (Ian VanSchooten)
  • 6022426 Docs: Add link to chat room in README primary links (alberto)
  • 2fbb530 Docs: Add link to “Proposing a Rule Change” in README (alberto)
  • 12a43f1 Docs: remove brace expansion from configuring.md (refs #5314) (Jonathan Haines)
  • a551831 Docs: Distinguish examples in rules under Node.js and CommonJS (Mark Pedrotti)
  • e3e06f3 Docs: Distinguish examples in rules under Best Practices part 4 (Mark Pedrotti)
  • a9f0865 Docs: Update no-sequences rule docs for clarity (fixes #5536) (Kai Cataldo)
  • bae7b30 Docs: Add michaelficarra as committer (alberto)
  • e2990e7 Docs: Consistent wording in rules README (alberto)
  • 49b4d2a Docs: Update team list with new members (Ilya Volodin)
  • 38a0a64 Docs: Clarify linebreak-style docs (fixes #5628) (alberto)
  • 051b255 Docs: Remove or rewrite references to former ecmaFeatures (Mark Pedrotti)
  • c335650 Docs: correct the no-confusing-arrow docs (Daniel Norman)
  • 5a881e7 Docs: Fix typo in code snippet for no-unmodified-loop-condition rule (Chris Rebert)
  • 9eaa20d Docs: Fix typo in CLI help message (ryym)
  • a7c3e67 Docs: Invalid json in configuring.md (alberto)
  • 4e50332 Docs: Make prefer-template examples consistent. (alberto)
  • d0ca171 Docs: Separate parser and config questions in issue template (Kevin Partington)
  • 9ca8567 Docs: Distinguish examples in rules under Best Practices part 3 (Mark Pedrotti)
  • b9c69f1 Docs: Distinguish examples in rules under Variables part 2 (Mark Pedrotti)

Dependency Upgrades

  • 646f863 Build: Bundle dependencies in package.json (fixes #5013) (Nicholas C. Zakas)
  • 569c478 Build: Fix phantomjs CI problems (fixes #5666) (alberto)

The latest ESLint news, case studies, tutorials, and resources.

ESLint v9.12.0 released
2 min read

ESLint v9.12.0 released

We just pushed ESLint v9.12.0, which is a minor release upgrade of ESLint. This release adds some new features and fixes several bugs found in the previous release.

ESLint v9.11.1 released
1 min read

ESLint v9.11.1 released

We just pushed ESLint v9.11.1, which is a patch release upgrade of ESLint. This release fixes several bugs found in the previous release.