question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Update rules to support ES2022 class fields

See original GitHub issue

What is the name of the syntax to implement?

Class fields

Please provide the TC39 URL for the syntax proposal:

Implementation Checklist

This issue tracks rules that need to be updated to support ES2022 class fields. Please add to this list if there are any additional rules that need to be updated. I’ve linked to any comments on the original PR for easier reference. Some rule updates may have been finished in #14591, in which case we can confirm the updates are sufficient and check off the rule here.

Are you willing to submit a pull request to implement this syntax?

We can work on these in parallel. To avoid redundant effort, please claim a rule when you start working on it.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:4
  • Comments:27 (27 by maintainers)

github_iconTop GitHub Comments

1reaction
mdjermanoviccommented, Sep 10, 2021

All planned tasks are done 🎉

I made a quick pass through all rules to check if anything should be additionally updated because of the new code path and new scope for class field initializers, and I didn’t see any problems.

If anyone finds more rules that need to be updated, please open new issues.

1reaction
nzakascommented, Aug 27, 2021

@mdjermanovic I think no-undef-init should not apply to class fields. If we do anything, I think a separate rule would make sense, though I’m not sure it’s important enough to warrant a core rule. I’ll defer to consensus on that.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ESLint v8.0.0-beta.2 released - Pluggable JavaScript Linter
All core rules have been updated to support ES2022 class fields and private class members. ESLint now fully supports the following ES2022 syntax ......
Read more >
Public class fields - JavaScript - MDN Web Docs - Mozilla
Public instance fields exist on every created instance of a class. By declaring a public field, you can ensure the field is always...
Read more >
Private class fields in Javascript (ES2022) - DEV Community ‍ ‍
Class fields and class methods are public by default. It is common you may want to make your class fields private.
Read more >
ES2022: A Complete Guide on Private Class Fields, Methods ...
Let's take a look at ES2022 changes for JavaScript classes, which includes the following new syntaxes: Private class fields and methods ...
Read more >
Master The Best New JavaScript Features in 2022 (ES2022 ...
Class Fields. The second feature that I think you should be most excited about is the accessor improvements to properties, fields and methods ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found