New Mar 21, 2025

ESLint v9.23.0 released

Libraries, Frameworks, etc. All from ESLint Blog View ESLint v9.23.0 released on eslint.org

Highlights

TypeScript Syntax Support in Core Rules

ESLint v9.23.0 introduces full TypeScript syntax support for three core rules. These rules are:

These rules can now be used to lint TypeScript files as well as regular JavaScript. To lint TypeScript code, be sure to use @typescript-eslint/parser, or another compatible parser. You can define the parser and the rules in your config file like this:

import { defineConfig } from "eslint/config";
import tsParser from "@typescript-eslint/parser";

export default defineConfig([
    {
        files: ["**/*.ts"],
        languageOptions: {
            parser: tsParser,
        },
        rules: {
            "class-methods-use-this": "error",
            "default-param-last": "error",
            "no-useless-constructor": "error",
        },
    },
]);

ESLint is actively working to add TypeScript syntax support to other core rules. Expect more updates soon.

Conflicting Autofix Detection

When running ESLint with the —fix option, some problems can be fixed automatically. However, what happens when two rules have differing opinions on how a specific part of code should be fixed?

The result is a fixed code that fails to satisfy either rule, and that will still contain problems based on your configuration.

For instance, consider this configuration:

import { defineConfig } from "eslint/config";
import stylistic from "@stylistic/eslint-plugin";
import stylisticJs from "@stylistic/eslint-plugin-js";

export default defineConfig([
    {
        plugins: {
            "@stylistic": stylistic,
            "@stylistic/js": stylisticJs,
        },
        rules: {
            "@stylistic/semi": ["error", "never"],
            "@stylistic/js/semi": ["error", "always"],
        },
    },
]);

In the above configuration, the rule @stylistic/semi is set to never allow semicolons at the end of a statement, but the rule @stylistic/js/semi always requires them. Obviously, it isn’t possible fix the code in a way that a statement fits both constraints.

In previous ESLint versions, the only indications for conflicting fixes in a file was the fact that the fixed code would still contain fixable errors. This was surprising to many users, as the cause for the behavior was often unclear.

ESLint v9.23.0 detects when two rules produce conflicting fixes and emits a warning:

ESLintCircularFixesWarning: Circular fixes detected while fixing path/to/file. It is likely that you have conflicting rules in your configuration.

We also provide instructions to fix the config.

Automatic Lookup for Configs with “flat/” Prefix

An interesting new feature for plugin developers is ESLint’s ability to detect a legacy config specified by its name with the extends property, and fall back to use a config with a similar name with the “flat/” prefix. This simplifies things for plugins that need to maintain similar configs for ESLint v9 and for previous versions, and that cannot change their naming conventions for backwards compatibility. See the documentation for further information.

Features

Bug Fixes

Documentation

Chores

Scroll to top