ESLint v9.22.0 released

We just pushed ESLint v9.22.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 defineConfig() and globalIgnores() helpers

This release introduces the defineConfig() and globalIgnores() helpers for configuration files. The defineConfig() helper brings type safety into your configuration file and also enables you to use the new extends key. The globalIgnores() helper ensures that your global ignores aren’t accidentally turned into local ignores. Here’s an example using both:

// eslint.config.js
import { defineConfig, globalIgnores } from "eslint/config";
import js from "@eslint/js";

export default defineConfig([
{
files: ["src/**/*.js"],
plugins: { js },
extends: ["js/recommended"], // extend the plugin's recommended config
rules: {
semi: "error"
}
},
globalIgnores(["dist", "build"])
]);

We think these helpers make creating and managing configuration files a lot easier. You can find all the details in the announcement blog post.

Features

  • 7ddb095 feat: Export defineConfig, globalIgnores (#19487) (Nicholas C. Zakas)

Bug Fixes

Documentation

  • 86c5f37 docs: Update README (GitHub Actions Bot)
  • fbdeff0 docs: Update README (GitHub Actions Bot)
  • c9e8510 docs: generate deprecation notice in TSDoc comments from rule metadata (#19461) (Francesco Trotta)
  • 2f386ad docs: replace var with const in rule examples (#19469) (Tanuj Kanti)
  • 0e688e3 docs: Update README (GitHub Actions Bot)
  • 06b596d docs: Restore the carrot to the position where the search input was lost (#19459) (Amaresh S M)

Chores

  • 97f788b chore: upgrade @eslint/js@9.22.0 (#19489) (Milos Djermanovic)
  • eed409a chore: package.json update for @eslint/js release (Jenkins)
  • f9a56d3 chore: upgrade eslint-scope@8.3.0 (#19488) (Milos Djermanovic)

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

Evolving flat config with extends
5 min read

Evolving flat config with extends

Your eslint.config.js files can now use extends to simplify your configuration.

ESLint v9.21.0 released
2 min read

ESLint v9.21.0 released

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