
Highlights
Inactive flags do not throw an error
When we released ESLint v9.18.0 earlier this year, some users reported that running ESLint with the unstable_ts_config
feature flag was throwing an error since that flag had become inactive.
While the error was expected, we realized that raising a warning would be more appropriate than throwing an error in certain situations when inactive flags are used, and we decided to change the behavior accordingly.
You can read more about the new feature flags policy in the documentation.
Empty configurations raise a warning
In ESLint v9.20.0, using an empty configuration or a configuration that exports an empty array as in export default []
results in a warning message.
To explicitly use a configuration that does nothing in tests or other scenarios, you can export an array with an empty object:
export default [{}];
Updated ESLint types
Last year, ESLint introduced the capability to lint languages other than JavaScript through the use of language plugins. ESLint v9.20.0 enhances many type definitions to ensure compatibility with the new features used especially in conjunction with language plugins. This change is especially significant for plugin developers because it makes it possible to create language plugins using TypeScript.
Features
Bug Fixes
91d4d9f
fix: Bring types in sync with @eslint/core (#19157) (Nicholas C. Zakas)fa25c7a
fix: Emit warning when empty config file is used (#19399) (Nicholas C. Zakas)31a9fd0
fix: Clearer error message for wrong plugin format (#19380) (Nicholas C. Zakas)61d99e3
fix: Better error message for unserializable parser (#19384) (Nicholas C. Zakas)db1b9a6
fix: Ensure module scope is checked for references inconsistent-this
(#19383) (Nicholas C. Zakas)8bcd820
fix:arrow-body-style
crash with single-token body (#19379) (Milos Djermanovic)
Documentation
b7012c8
docs: rewrite examples with var using let and const (#19407) (Mueez Javaid Hashmi)6406376
docs: Update README (GitHub Actions Bot)350f2b9
docs: rewrite some examples with var using let and const (#19404) (Mueez Javaid Hashmi)93c325a
docs: rewrite examples with var using let and const (#19398) (Mueez Javaid Hashmi)56ff404
docs: replace var with let or const in rules docs (#19396) (Daniel Harbrueger)4053226
docs: changesourceType
inno-eval
examples (#19393) (Milos Djermanovic)1324af0
docs: replace var with let and const in rules docs (#19392) (Daniel Harbrueger)8b87e00
docs: replacevar
withconst
andlet
in rules (#19389) (Tanuj Kanti)758c66b
docs: Explain what frozen rules mean (#19382) (Nicholas C. Zakas)0ef8bb8
docs: additional checks for rule examples (#19358) (Milos Djermanovic)58ab2f6
docs: fix order of installation steps in getting started (#19326) (Tanuj Kanti)
Chores
979097a
chore: upgrade @eslint/js@9.20.0 (#19412) (Francesco Trotta)031734e
chore: package.json update for @eslint/js release (Jenkins)d4c47c3
test: avoid empty config warning in test output (#19408) (Milos Djermanovic)67dd82a
chore: update dependency @eslint/json to ^0.10.0 (#19387) (renovate[bot])15ac0e1
chore: add permissions: read-all to stale.yml workflow (#19374) (Josh Goldberg ✨)