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

ES3 reserved words #1062

Closed
aladdin-add opened this issue Sep 2, 2021 · 1 comment
Closed

ES3 reserved words #1062

aladdin-add opened this issue Sep 2, 2021 · 1 comment

Comments

@aladdin-add
Copy link

aladdin-add commented Sep 2, 2021

this was from eslint/eslint#15017

acorn can parse var char = 0; with no errors (ecmaVersion: 3). but char is a ES3 reserved word:

Снимок экрана 2021-09-01 в 20 46 37

any reasons the option allowReserved defaults to true? IMHO, it makes sense defaults to false in non-loose mode.

@marijnh
Copy link
Member

marijnh commented Sep 2, 2021

Most browsers in the ES3 era allowed reserved words to be used in scripts, hence this default. It is not going to change for backwards-compatibility reasons.

@marijnh marijnh closed this as completed Sep 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants