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

ecmaVersion >= 2015 #82

Closed
mdjermanovic opened this issue Nov 28, 2021 · 0 comments · Fixed by #83
Closed

ecmaVersion >= 2015 #82

mdjermanovic opened this issue Nov 28, 2021 · 0 comments · Fixed by #83
Labels
Projects

Comments

@mdjermanovic
Copy link
Member

ref: eslint/eslint#15185 (comment)

eslint-scope expects 3, 5, 6, 7, ... 13 as ecmaVersion. Those are the values eslint-scope is currently getting from ESLint, and all eslint-scope tests are based on those values.

After we merge and release eslint/eslint#15185, ESLint will be passing 3, 5, 2015, 2016, ... 2022 as ecmaVersion to eslint-scope, regardless of the mode (eslintrc or flat config).

This should work the same as it was working before, because eslint-scope uses ecmaVersion only to check if it is >= 5, and >= 6:

isStrictModeSupported() {
return this.__options.ecmaVersion >= 5;
}

__isES6() {
return this.__options.ecmaVersion >= 6;
}

So, any of 6, 7, 8, 9, 10, 11, 12, 13, 2015, 2016, 2017, 2018, 2019, 2020, 2021, and 2022 will work the same, as they're all >= 5 and >= 6.

However, it would be good to add some tests with the new values, to confirm this behavior and make sure that it won't break after future changes to eslint-scope.

@eslint-github-bot eslint-github-bot bot added this to Needs Triage in Triage Nov 28, 2021
mdjermanovic added a commit that referenced this issue Dec 1, 2021
@mdjermanovic mdjermanovic moved this from Needs Triage to Pull Request Opened in Triage Dec 2, 2021
Triage automation moved this from Pull Request Opened to Complete Dec 4, 2021
mdjermanovic added a commit that referenced this issue Dec 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Triage
Complete
Development

Successfully merging a pull request may close this issue.

1 participant