Skip to content

update the JavaScript version policy to ES2022 (after June 2027) #876

@erwindon

Description

@erwindon

Is your feature request related to a problem? Please describe.
Start using features from this JS version

Describe the solution you'd like
Start using useful features from this JS version.

The 13th edition, ECMAScript 2022, was published in June 2022. This version introduces top-level await, allowing the keyword to be used at the top level of modules; new class elements: public and private instance fields, public and private static fields, private instance methods and accessors, and private static methods and accessors; static blocks inside classes, to perform per-class evaluation initialization; the #x in obj syntax, to test for presence of private fields on objects; regular expression match indices via the /d flag, which provides start and end indices for matched substrings; the cause property on Error objects, which can be used to record a causation chain in errors; the at method for Strings, Arrays, and TypedArrays, which allows relative indexing; and Object.hasOwn, a convenient alternative to Object.prototype.hasOwnProperty.

Additional context
Update:

  • docs/README.md (ecmaVersion)
  • eslint.config.js
  • any JS code

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions