Versions

Migrate to v10.x

ESLint v10.0.0 is a major release of ESLint, and as such, has several breaking changes that you need to be aware of. This guide is intended to walk you through the breaking changes.

The lists below are ordered roughly by the number of users each change is expected to affect, where the first items are expected to affect the most users.

Table of Contents

Breaking changes for users

Breaking changes for plugin developers

Breaking changes for integration developers


Node.js < v20.19, v21, v23 are no longer supported

ESLint is officially dropping support for these versions of Node.js starting with ESLint v10.0.0. ESLint now supports the following versions of Node.js:

  • Node.js v20.19.0 and above
  • Node.js v22.13.0 and above
  • Node.js v24 and above

To address: Make sure you upgrade to at least Node.js v20.19.0 when using ESLint v10. One important thing to double check is the Node.js version supported by your editor when using ESLint via editor integrations. If you are unable to upgrade, we recommend continuing to use ESLint v9 until you are able to upgrade Node.js.

Related issue(s): #19969

New configuration file lookup algorithm

In ESLint v9, the alternate config lookup behavior could be enabled with the v10_config_lookup_from_file feature flag. This behavior made ESLint locate eslint.config.* by starting from the directory of each linted file and searching up towards the filesystem root. In ESLint v10, this behavior is now the default and the v10_config_lookup_from_file flag has been removed. Attempting to use this flag will now result in an error.

To address:

  • Remove any usage of the flag in your setup:
    • CLI: remove --flag v10_config_lookup_from_file.
    • Environment: remove v10_config_lookup_from_file from ESLINT_FLAGS.
    • API: remove "v10_config_lookup_from_file" from the flags array passed to new ESLint() or new Linter().
  • If you relied on the previous (cwd-based) lookup behavior, provide an explicit config path with --config path/to/eslint.config.js.

Related issue(s): #19967

no-shadow-restricted-names now reports globalThis by default

In ESLint v10, the no-shadow-restricted-names rule now treats globalThis as a restricted name by default. Consequently, the reportGlobalThis option now defaults to true (previously false). As a result, declarations such as const globalThis = "foo"; or function globalThis() {} will now be reported by default.

To address:

  • Rename local identifiers named globalThis to avoid shadowing the global.
  • Or restore the previous behavior by configuring the rule explicitly:
{
	"rules": {
		"no-shadow-restricted-names": ["error", { "reportGlobalThis": false }]
	}
}

Related issue(s): #19673

eslint:recommended has been updated

Three new rules have been enabled in eslint:recommended:

To address: Fix errors or disable these rules.

Related issue(s): #19966

Jiti < v2.2.0 are no longer supported

ESLint is officially dropping support for versions of jiti that are less than v2.2.0.

To address: If you’ve authored your config file in TypeScript and have jiti v2.1.2 or earlier installed, be sure to update it to at least 2.2.0 when using ESLint v10.

Related issue(s): #19765

Change Language