Skip to content

Upgrading @eslint/js 9 to 10

Breaking9.39.5 → 10.0.1Breaking19Security2Platform1Deprecated1New8Changed5Fixed21Other93

BreakingUpgrade verdict

19 breaking changes and a platform requirement change and 2 security fixes.

  • The old .eslintrc style configuration is no longer supported; only flat config works.
  • Color handling now uses Node's built-in styling instead of the chalk package, and results metadata includes a color field.
  • ESLint now tracks references in JSX code, which can change scope analysis results.
  • Older SourceCode methods that were already deprecated are gone, so rules using them will break.
Top 5 of 23 that need code or config changes

Node.js requirement changed in 10.0.1: ^18.18.0 || ^20.9.0 || >=21.1.0 → ^20.19.0 || ^22.13.0 || >=24.

Breaking19
Removes eslintrc configuration support.
eslintrc
Replaces chalk with styleText and adds color to ResultsMeta.
chalkstyleTextResultsMetaResultsMeta.color
Enables JSX reference tracking.
Removes deprecated SourceCode methods.
SourceCode
Makes rule tester assertions stricter for valid test cases.
Removes deprecated rule context methods.
context
Reports eslint-env comments as errors.
eslint-env
Updates the eslint:recommended configuration.
eslint:recommended
Removes v10_* and inactive unstable_* flags.
v10_*unstable_*
Estimates rule-tester failure location instead of reporting the exact location.
Adds a name property to config objects.
name
Uses ScopeManager#addGlobals() for adding globals.
ScopeManager#addGlobals()
Adds uniqueItems: true to the no-invalid-regexp option schema.
no-invalid-regexpuniqueItems
Makes the Program node range span the entire source text.
Programrange
Asserts that text is a string across all RuleFixer methods.
RuleFixer
Tightens the func-names rule schema.
func-names
Removes deprecated LintMessage#nodeType and TestCaseError#type.
LintMessage#nodeTypeTestCaseError#type
no-shadow-restricted-names now reports globalThis by default.
no-shadow-restricted-namesglobalThis
Removes the raw parser option from the JS language.
raw
Security2
Updates minimatch to 10.2.1 to address security vulnerabilities.
minimatch
Updates dependency js-yaml to v4 as a security fix.
js-yaml
Platform1
Requires Node.js ^20.19.0 || ^22.13.0 || >=24.
Deprecated1
Deprecates the "always" and "as-needed" options of the radix rule.
radixalwaysas-needed