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

esversion beyond 11 #3645

Open
erosman opened this issue May 8, 2023 · 2 comments
Open

esversion beyond 11 #3645

erosman opened this issue May 8, 2023 · 2 comments

Comments

@erosman
Copy link

erosman commented May 8, 2023

I noticed Static initialization blocks (FF93 (Released 2021-10-05) Ch94 ECMAScript 2022 aka ES13) cause error in JSHint.

Changing esversion option to 13 didn't make any difference.

Is there support for ES12-13?

Also:
Public class fields (FF69 (Released 2019-09-03)) also cause an error.
Previously: #3139, #3361

@erosman
Copy link
Author

erosman commented May 12, 2023

re: E054

E054: "Class properties must be methods. Expected '(' but instead saw '{a}'.",

if (state.tokens.next.value !== "(") {

class Test {

  static prop = 'value';

}

Would this work?

if (state.tokens.next.value !== "(" && state.tokens.next.value !== "=") {
  error("E054", state.tokens.next, state.tokens.next.value);
  advance();

@ryan65
Copy link

ryan65 commented May 17, 2023

I too am wondering why jshint supports only up to esversion 11 . doesnt seem to accept 12 or 13 in the .jshintrc
thanks.

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