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

in es3, "use strict" should not be parsed as directive #1126

Closed
aladdin-add opened this issue Apr 27, 2022 · 4 comments
Closed

in es3, "use strict" should not be parsed as directive #1126

aladdin-add opened this issue Apr 27, 2022 · 4 comments

Comments

@aladdin-add
Copy link

no nodes should be parsed as Directive nodes in ES3 mode. it was found in eslint/js#547 (comment)

related: 353e24f

@marijnh
Copy link
Member

marijnh commented Apr 27, 2022

I think this was fixed in 353e24f . Can you confirm?

@aladdin-add
Copy link
Author

aladdin-add commented Apr 27, 2022

to clarify, I was using the newly released acorn v8.7.1. it was partly fixed, an example:

"use strict";
var foo = 00;

@marijnh
Copy link
Member

marijnh commented Apr 27, 2022

I see what you mean now. Attached patch should help.

@ljharb
Copy link
Contributor

ljharb commented Oct 17, 2024

@marijnh is there any clean way via a plugin (that i can add via eslint config) to revert these changes? in other words, i want to enforce ES3 syntax but respecting strict mode semantics, so that I can upgrade eslint beyond v8.8.0.

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

3 participants