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

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

Retiring the contributor pool
3 min read

Retiring the contributor pool

After five years and more than $51,000 paid to contributors, we're retiring the contributor pool as AI-generated pull requests make it harder to keep the program focused on human contributions.

ESLint v10.15.0 released
2 min read

ESLint v10.15.0 released

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