
Highlights
This version of ESLint is not ready for production use and is provided to gather feedback from the community before releasing the final version. Please let us know if you having any problems or feedback by creating issues on our GitHub repo.
Most of the highlights of this release are breaking changes, and are discussed further in the migration guide. There are summaries of the significant changes below. (Less significant changes are included in the migration guide.)
This prerelease version of ESLint has a separate documentation section.
Node.js < v20.19.0, v21, v23 no longer supported
As of this post, Node.js v22.x is the LTS release, and as such we are dropping support for all versions of Node.js prior to v20.19.0 as well as v21.x and v23.x.
ESLint v10.0.0 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
New configuration file lookup algorithm
ESLint v10.0.0 locates eslint.config.* by starting from the directory of each linted file rather than the current working directory as it was the case with ESLint v9.x. The new behavior allows for using multiple configuration files in the same run and can be particularly useful in monorepo setups.
In ESLint v9.x, this config lookup behavior could be enabled with the v10_config_lookup_from_file feature flag. In ESLint v10.0.0, this behavior is now the default and the v10_config_lookup_from_file flag has been removed.
Removed eslintrc functionality
As announced in Flat config rollout plans, the eslintrc config system has been completely removed in ESLint v10.0.0. Specifically, this means:
- The
ESLINT_USE_FLAT_CONFIGenvironment variable is no longer honored. - The CLI no longer supports eslintrc-specific arguments (
--no-eslintrc,--env,--resolve-plugins-relative-to,--rulesdir,--ignore-path). .eslintrc.*and.eslintignorefiles will no longer be honored./* eslint-env */comments are reported as errors.- The
loadESLint()function now always returns theESLintclass. - The
LinterconstructorconfigTypeargument can only be"flat"and will throw an error if"eslintrc"is passed. - The following
Lintereslintrc-specific methods are removed:defineParser()defineRule()defineRules()getRules()
- The following changes to the
/use-at-your-own-riskentrypoint:LegacyESLintis removedFileEnumeratoris removedshouldUseFlatConfig()function will always returntrue
Jiti < v2.2.0 no longer supported
ESLint v10.0.0 drops support for jiti versions prior to 2.2.0 when loading TypeScript configuration files due to known issues that can cause compatibility problems when configurations load certain plugins.
Updated eslint:recommended
The eslint:recommended configuration is updated to include new rules that we feel are important.
Removed deprecated rule context members
The following rule context members are no longer available:
context.getCwd()- Usecontext.cwdinsteadcontext.getFilename()- Usecontext.filenameinsteadcontext.getPhysicalFilename()- Usecontext.physicalFilenameinsteadcontext.getSourceCode()- Usecontext.sourceCodeinsteadcontext.parserOptions- Usecontext.languageOptionsorcontext.languageOptions.parserOptionsinsteadcontext.parserPath- No replacement
Users of plugins that haven’t updated their code yet can use the @eslint/compat utility in the meantime.
Removed deprecated LintMessage#nodeType and TestCaseError#type properties
In ESLint v10.0.0, the deprecated nodeType property on LintMessage objects has been removed. Correspondingly, RuleTester no longer accepts the deprecated type property in errors of invalid test cases.
Program AST node range spans entire source text
Starting with ESLint v10.0.0, Program AST node’s range spans the entire source text. Previously, leading and trailing comments/whitespace were not included in the range.
The default parser (espree) has already been updated. Custom parsers are expected to be updated accordingly.
New requirements for ScopeManager implementations
Starting with ESLint v10.0.0, custom ScopeManager implementations must automatically resolve references to global variables declared in the code, including var and function declarations, and provide an instance method addGlobals(names: string[]) that creates variables with the given names in the global scope and resolves references to them.
The default ScopeManager implementation (eslint-scope) has already been updated. Custom ScopeManager implementations are expected to be updated accordingly.
Installing
Since this is a pre-release version, you will not automatically be upgraded by npm. You must specify the next tag when installing:
npm i eslint@next --save-dev
You can also specify the version directly:
npm i eslint@10.0.0-alpha.0 --save-dev
Migration Guide
As there are a lot of changes, we’ve created a migration guide describing the breaking changes in great detail along with the steps you should take to address them. We expect that most users should be able to upgrade without any build changes, but the migration guide should be a useful resource if you encounter problems.
Breaking Changes
96512a6fix!: Remove deprecated rule context methods (#20086) (Nicholas C. Zakas)c69fdacfeat!: remove eslintrc support (#20037) (Francesco Trotta)208b5ccfeat!: UseScopeManager#addGlobals()(#20132) (Milos Djermanovic)a2ee188fix!: adduniqueItems: trueinno-invalid-regexpoption (#20155) (Tanuj Kanti)a89059dfeat!: Program range span entire source text (#20133) (Pixel998)39a6424fix!: assert ‘text’ is a string across all RuleFixer methods (#20082) (Pixel998)f28fbf8fix!: Deprecate"always"and"as-needed"options of theradixrule (#20223) (Milos Djermanovic)aa3fb2bfix!: tightenfunc-namesschema (#20119) (Pixel998)f6c0ed0feat!: reporteslint-envcomments as errors (#20128) (Francesco Trotta)4bf739ffix!: remove deprecatedLintMessage#nodeTypeandTestCaseError#type(#20096) (Pixel998)523c076feat!: drop support for jiti < 2.2.0 (#20016) (michael faith)454a292feat!: updateeslint:recommendedconfiguration (#20210) (Pixel998)4f880eefeat!: removev10_*and inactiveunstable_*flags (#20225) (sethamus)f18115cfeat!:no-shadow-restricted-namesreportglobalThisby default (#20027) (sethamus)c6358c3feat!: Require Node.js^20.19.0 || ^22.13.0 || >=24(#20160) (Milos Djermanovic)
Documentation
4b5dbcddocs: reorder v10 migration guide (#20315) (Milos Djermanovic)5d84a73docs: Update README (GitHub Actions Bot)37c8863docs: fix incorrect anchor link in v10 migration guide (#20299) (Pixel998)077ff02docs: add migrate-to-10.0.0 doc (#20143) (唯然)3822e1bdocs: Update README (GitHub Actions Bot)
Chores
1e2cad5chore: package.json update for @eslint/js release (Jenkins)9da2679chore: update@eslint/*dependencies (#20321) (Milos Djermanovic)0439794refactor: use types from @eslint/core (#20235) (jaymarvelz)cb51ec2test: cleanupSourceCode#traversetests (#20289) (Milos Djermanovic)897a347chore: remove restriction fortypein rule tests (#20305) (Pixel998)d972098chore: ignore prettier updates in renovate to keep in sync with trunk (#20304) (Pixel998)a086359chore: remove redundantfast-globdev-dependency (#20301) (루밀LuMir)564b302chore: installprettieras a dev dependency (#20302) (michael faith)8257b57refactor: correct regex foreslint-plugin/report-message-format(#20300) (루밀LuMir)e251671refactor: extract assertions in RuleTester (#20135) (唯然)2e7f25echore: addlegacy-peer-depsto.npmrc(#20281) (Milos Djermanovic)39c638achore: update eslint-config-eslint dependencies for v10 prereleases (#20278) (Milos Djermanovic)8533b3fchore: update dependency @eslint/json to ^0.14.0 (#20288) (renovate[bot])796ddf6chore: update dependency @eslint/js to ^9.39.1 (#20285) (renovate[bot])
