Highlights
- Beta testing revealed that the impact of the breaking change to allow line comment directives for all directives that previously required block comments outweighs the benefits of this feature due to a high number of accidental directives, so we decided to revert this change and exclude this feature from v8.0.0.
- Code Path Analysis now supports ES2022 class fields. In particular, each class field initializer now starts a separate code path. A new
origin
property has been added to CodePath objects. - The
meta.docs.category
property has been removed from all core rules.
Since this is a beta release, it is not expected to be ready for production, but please try it and report any unexpected issues.
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@8.0.0-beta.1 --save-dev
Migration Guide
As there are a lot of changes, we’ve created a migration guide describing the 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
Enhancements
05ca24c
Update: Code path analysis for class fields (fixes #14343) (#14886) (Nicholas C. Zakas)44c6fc8
Update: support class fields in func-name-matching (refs #14857) (#14964) (Milos Djermanovic)3d7d5fb
Update: reporting loc fornever
option ineol-last
(refs #12334) (#14840) (Nitin Kumar)f110926
Update: fix no-unused-vars false negative with comma operator (#14928) (Sachin)26b0cd9
Update: fix no-unreachable logic for class fields (refs #14857) (#14920) (Milos Djermanovic)
Bug Fixes
3409785
Fix: camelcase ignoreGlobals shouldn’t apply to undef vars (refs #14857) (#14966) (Milos Djermanovic)ee1b54f
Fix: keyword-spacing private name compat (refs #14857) (#14946) (Nicholas C. Zakas)
Documentation
396a0e3
Docs: update ScopeManager with class fields (#14974) (Milos Djermanovic)6663e7a
Docs: removedocs
script (fixes #14288) (#14971) (Nitin Kumar)44f7de5
Docs: Update deprecated information (#14961) (TagawaHirotaka)a8bcef7
Docs: Add 2021 and 2022 to supported ECMAScript versions (#14952) (coderaiser)b301069
Docs: fix ‘When Not To Use’ in prefer-named-capture-group (refs #14959) (#14969) (Milos Djermanovic)e98f14d
Docs: Fix typo in no-implicit-globals.md (#14954) (jwbth)81c60f4
Docs: document ESLint api (#14934) (Sam Chen)
Build Related
Chores
db15183
Chore: Refactor comments of tests (#14956) (TagawaHirotaka)a79c9f3
Chore: Enforce jsdoc check-line-alignment never (#14955) (Brett Zamir)2d18db6
Chore: add test for mergingparserOptions
in Linter (#14948) (Milos Djermanovic)9a4ae3b
Chore: Apply comment require-description and check ClassDeclaration (#14949) (Brett Zamir)8344675
Chore: fix small typo (#14951) (Sosuke Suzuki)58840ac
Chore: Update jsdoc plugin and tweak rules in effect (#14814) (Brett Zamir)