Saturday, 14 August, 2021 UTC


Summary

ESLint v8.0.0-beta.0 released
We just pushed ESLint v8.0.0-beta.0, which is a major release upgrade of ESLint. This release adds some new features and fixes several bugs found in the previous release. This release also has some breaking changes, so please read the following closely.
Highlights
Most of the highlights of this release are breaking changes, and are discussed further in the migration guide. In addition, there are some new features:
  • The default parser now supports ES2022 syntax, including class fields and top-level await. Some rules still need to be updated, and you can follow progress on the tracking issue.
  • Autofix gained support for removing unused disable directives when using --fix with --report-unused-disable-directives.
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 [email protected] --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
  • 24c9f2a Breaking: Strict package exports (refs #13654) (#14706) (Nicholas C. Zakas)
  • 86d31a4 Breaking: disallow SourceCode#getComments() in RuleTester (refs #14744) (#14769) (Milos Djermanovic)
  • 1d2213d Breaking: Fixable disable directives (fixes #11815) (#14617) (Josh Goldberg)
  • 4a7aab7 Breaking: require meta for fixable rules (fixes #13349) (#14634) (Milos Djermanovic)
  • d6a761f Breaking: Require meta.hasSuggestions for rules with suggestions (#14573) (Bryan Mishkin)
  • 4c841b8 Breaking: allow all directives in line comments (fixes #14575) (#14656) (薛定谔的猫)
  • 6bd747b Breaking: support new regex d flag (fixes #14640) (#14653) (Yosuke Ota)
  • 8b4f3ab Breaking: fix comma-dangle schema (fixes #13739) (#14030) (Joakim Nilsson)
  • b953a4e Breaking: upgrade espree and support new class features (refs #14343) (#14591) (Toru Nagashima)
  • 8cce06c Breaking: add some rules to eslint:recommended (refs #14673) (#14691) (薛定谔的猫)
  • 86bb63b Breaking: Drop codeframe and table formatters (#14316) (Federico Brigante)
  • f3cb320 Breaking: drop node v10/v13/v15 (fixes #14023) (#14592) (薛定谔的猫)
Enhancements
  • 9052eee Update: check class fields in no-extra-parens (refs #14857) (#14906) (Milos Djermanovic)
Bug Fixes
  • af96584 Fix: handle computed class fields in operator-linebreak (refs #14857) (#14915) (Milos Djermanovic)
  • a773b99 Fix: no-useless-computed-key edge cases with class fields (refs #14857) (#14903) (Milos Djermanovic)
  • cbc43da Fix: prefer-destructuring PrivateIdentifier false positive (refs #14857) (#14897) (Milos Djermanovic)
  • ccb9a91 Fix: dot-notation false positive with private identifier (refs #14857) (#14898) (Milos Djermanovic)
Documentation
  • 28fe19c Docs: Add v8.0.0 migration guide (fixes #14856) (#14884) (Nicholas C. Zakas)
  • 1f5d088 Docs: add an example Object.assign() for rule no-import-assign (#14916) (薛定谔的猫)
  • c4e5802 Docs: improve rule details for no-console (fixes #14793) (#14901) (Nitin Kumar)
  • 5c3a470 Docs: add class fields in no-multi-assign documentation (refs #14857) (#14907) (Milos Djermanovic)
  • d234d89 Docs: add class fields in func-names documentation (refs #14857) (#14908) (Milos Djermanovic)
  • e037d61 Docs: Mention workaround for escaping the slash character in selectors (#14675) (Aria)
  • 81f03b6 Docs: Update license copyright (#14877) (Nicholas C. Zakas)
Dependency Upgrades
  • ec9db63 Upgrade: @eslint/[email protected] (#14865) (Milos Djermanovic)
  • 62c6fe7 Upgrade: Debug 4.0.1 > 4.3.2 (#14892) (sandesh bafna)
  • 88db3f5 Upgrade: js-yaml to v4 (#14890) (Bryan Mishkin)
  • ae6072b Upgrade: eslint-visitor-keys to v3 (#14902) (Bryan Mishkin)
  • e53d8cf Upgrade: markdownlint dev dependencies (#14883) (Bryan Mishkin)
  • d66e941 Upgrade: @humanwhocodes/config-array to 0.6 (#14891) (Bryan Mishkin)
Build Related
  • b8b2d55 Build: add codeql (#14729) (薛定谔的猫)
Chores
  • be334f9 Chore: Fix Makefile call to linter.getRules() (#14932) (Brandon Mills)
  • 0c86b68 Chore: Replace old syntax for Array flat/flatMap (#14614) (Stephen Wade)
  • 6a89f3f Chore: ignore yarn-error.log and .pnpm-debug.log (#14925) (Nitin Kumar)
  • 3b6cd89 Chore: Add rel/abs path tests in no-restricted-{imports/modules} rules (#14910) (Bryan Mishkin)
  • f984515 Chore: add assertions on reporting location in semi (#14899) (Nitin Kumar)
  • 149230c Chore: Specify Node 14.x for Verify Files CI job (#14896) (Milos Djermanovic)
  • 537cf6a Chore: update glob-parent (fixes #14879)(#14887) (Nitin Kumar)
  • f7b4a3f Chore: update dev deps to latest (#14624) (薛定谔的猫)