Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): bump to ecmaVersion 2020 #195

Merged
merged 1 commit into from
Apr 26, 2024

Conversation

MikeMcC399
Copy link
Collaborator

Issue

The instructions in the original ESLint blog post Preparing your custom rules for ESLint v9.0.0 for converting the deprecated context.getScope() and context.getAncestors() did not work for ESLint >=7 <=8.3.0.

The new suggestions involve using the Nullish coalescing operator (??). The code falls back to previous API standards if the new API calls aren't available, so it can be used flexibly in old and new ESLint versions.

The new suggestions however fail linting in this repo with the following error message:

error Parsing error: Unexpected token ?

Background

The Nullish coalescing operator (??) was introduced in ECMAScript 2020, the 11th edition (reference ECMAScript 2025 > Introduction).

ECMAScript 2020 (ES11) was released in June 2020.

The lowest supported version of Node.js is Release 18.x Node.js 18.0.0 was released 2 years after ECMAScript 2020.

Change

Bump the ecmaVersion from 2018 to 2020

"parserOptions": {
"ecmaVersion": 2018
}

Related

@cypress-app-bot
Copy link

@MikeMcC399 MikeMcC399 marked this pull request as ready for review April 26, 2024 08:13
@MikeMcC399 MikeMcC399 self-assigned this Apr 26, 2024
@jennifer-shehane jennifer-shehane merged commit 21c8bd2 into cypress-io:master Apr 26, 2024
8 checks passed
@MikeMcC399 MikeMcC399 deleted the ecma-2020 branch April 26, 2024 12:26
@cypress-app-bot
Copy link

🎉 This PR is included in version 3.0.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants