
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
91d4d9ffix: Bring types in sync with @eslint/core (#19157) (Nicholas C. Zakas)fa25c7afix: Emit warning when empty config file is used (#19399) (Nicholas C. Zakas)31a9fd0fix: Clearer error message for wrong plugin format (#19380) (Nicholas C. Zakas)61d99e3fix: Better error message for unserializable parser (#19384) (Nicholas C. Zakas)db1b9a6fix: Ensure module scope is checked for references inconsistent-this(#19383) (Nicholas C. Zakas)8bcd820fix:arrow-body-stylecrash with single-token body (#19379) (Milos Djermanovic)
Documentation
b7012c8docs: rewrite examples with var using let and const (#19407) (Mueez Javaid Hashmi)6406376docs: Update README (GitHub Actions Bot)350f2b9docs: rewrite some examples with var using let and const (#19404) (Mueez Javaid Hashmi)93c325adocs: rewrite examples with var using let and const (#19398) (Mueez Javaid Hashmi)56ff404docs: replace var with let or const in rules docs (#19396) (Daniel Harbrueger)4053226docs: changesourceTypeinno-evalexamples (#19393) (Milos Djermanovic)1324af0docs: replace var with let and const in rules docs (#19392) (Daniel Harbrueger)8b87e00docs: replacevarwithconstandletin rules (#19389) (Tanuj Kanti)758c66bdocs: Explain what frozen rules mean (#19382) (Nicholas C. Zakas)0ef8bb8docs: additional checks for rule examples (#19358) (Milos Djermanovic)58ab2f6docs: fix order of installation steps in getting started (#19326) (Tanuj Kanti)
Chores
979097achore: upgrade @eslint/js@9.20.0 (#19412) (Francesco Trotta)031734echore: package.json update for @eslint/js release (Jenkins)d4c47c3test: avoid empty config warning in test output (#19408) (Milos Djermanovic)67dd82achore: update dependency @eslint/json to ^0.10.0 (#19387) (renovate[bot])15ac0e1chore: add permissions: read-all to stale.yml workflow (#19374) (Josh Goldberg ✨)
