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

ESLint v8.4.0 released

We just pushed ESLint v8.4.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

New Parser Option

The default parser has a new option allowReserved (boolean, default false). When set to true, reserved words can be used as identifiers.

This option can only be used with "ecmaVersion": 3.

{
"parserOptions": {
"ecmaVersion": 3,
"allowReserved": true
}
}

New Features for Custom Formatters

This release adds two new features for custom formatters.

Async Formatters

Formatters are now allowed to return Promise<string>. That is, a formatter can be an async function.

//------ my-formatter.js ------
module.exports = async function(results, context) {
const something = await getSomethingAsync();
// ...
return formattedResults;
};

context.cwd

The context argument has a new property cwd (string, absolute path). It represents the working directory used for linting. This value comes from the cwd constructor option of the ESLint class, and formatters can use it to output relative paths more reliably than by using process.cwd().

//------ my-formatter.js ------
module.exports = function(results, context) {
const cwd = context.cwd;
// ...
};

Features

Bug Fixes

  • 4940cc5 fix: mark --rulesdir option as deprecated in CLI docs (#15310) (Kevin Partington)

Documentation

Chores

  • efede90 chore: upgrade @eslint/eslintrc@1.0.5 (#15389) (Milos Djermanovic)
  • 0b8c846 chore: fix update-readme to avoid multiple consecutive blank lines (#15375) (Milos Djermanovic)
  • 94b2a8b chore: Use default Chromium binary in M1 Mac tests (#15371) (Brandon Mills)
  • ba58d94 ci: use node v16 for Verify Files (#15364) (Nitin Kumar)
  • 1e32ee5 chore: add jsdoc type annotation to rules (#15291) (Bryan Mishkin)

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

ESLint v9.16.0 released
2 min read

ESLint v9.16.0 released

We just pushed ESLint v9.16.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.15.0 released
2 min read

ESLint v9.15.0 released

We just pushed ESLint v9.15.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.14.0 released
2 min read

ESLint v9.14.0 released

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