Highlights
This is a summary of the major changes you need to know about for this version of ESLint.
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@9.0.0-rc.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.
Precalculated Code Paths
ESLint v9.0.0 now precalculates code path information before the traversal used by rules. As a result, the code path information is now complete regardless of where it is accessed inside of a rule.
Disallow Unused // fallthrough
Comments
In ESLint v9.0.0-rc.0, the rule no-fallthrough
has a new option reportUnusedFallthroughComment
.
When this option is set to true
, the rule will prohibit a fallthrough comment if a case can never fallthrough.
This is intended to help avoiding misleading comments that can occur as a result of refactoring.
Breaking Changes
Features
b8fb572
feat: addreportUnusedFallthroughComment
option to no-fallthrough rule (#18188) (Kirk Waiblinger)
Bug Fixes
Documentation
239a7e2
docs: Clarify the description ofsort-imports
options (#18198) (gyeongwoo park)4769c86
docs: fix incorrect example inno-lone-blocks
(#18215) (Tanuj Kanti)5251327
docs: Update README (GitHub Actions Bot)1dc8618
docs: Update README (GitHub Actions Bot)
Build Related
Chores
297416d
chore: package.json update for eslint-9.0.0-rc.0 (#18223) (Francesco Trotta)d363c51
chore: package.json update for @eslint/js release (Jenkins)1b841bb
chore: fix some comments (#18213) (avoidaway)29c3595
chore: remove repetitive words (#18193) (cuithon)acc2e06
chore: Introduce Knip (#18005) (Lars Kappert)