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

Support PropertyDefinition #1127

Merged
merged 5 commits into from Apr 10, 2021
Merged

Conversation

fisker
Copy link
Collaborator

@fisker fisker commented Feb 23, 2021

@fisker fisker marked this pull request as ready for review February 23, 2021 04:27
@fisker
Copy link
Collaborator Author

fisker commented Feb 23, 2021

babel switched type back to ClassProperty by default, but it's in estree spec, wthis will still needed someday.

@JLHwung
Copy link
Contributor

JLHwung commented Feb 23, 2021

Yeah, I plan to enable it by default in Babel 8. Unfortunately we could not enable it on 7.13 since many eslint plugins still depend on Babel AST.

@fisker
Copy link
Collaborator Author

fisker commented Feb 23, 2021

I checked the babel PR above, seems it use eslint as babel plugin in test, how do I enable classFeatures in @babel/eslint-parser? So I can test with the new tree.

@JLHwung
Copy link
Contributor

JLHwung commented Feb 23, 2021

You can pin @babel/eslint-parser to 7.13.0. In the future it can be toggled on by BABEL_8_BREAKING=true env.

@fisker
Copy link
Collaborator Author

fisker commented Feb 24, 2021

@JLHwung Do you think we can add an option for it in @babel/eslint-parser? Maybe through parseOptions.

I think this can help other eslint plugins easily test/prepare for both these two node types.

@sindresorhus
Copy link
Owner

@JLHwung ^

@JLHwung
Copy link
Contributor

JLHwung commented Apr 8, 2021

@sindresorhus Thanks for the ping!

The upstream Babel issue has been resolved. See babel/babel#12891 for an example config enabling the PropertyDefinition in @babel/eslint-parser.

@sindresorhus
Copy link
Owner

@fisker Is this ready to be merged?

@fisker fisker merged commit 75c4d78 into sindresorhus:main Apr 10, 2021
@fisker fisker deleted the property-definition branch April 10, 2021 06:51
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

Successfully merging this pull request may close these issues.

None yet

3 participants