Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

add semicolon to examples #155

Closed
wants to merge 1 commit into from
Closed

add semicolon to examples #155

wants to merge 1 commit into from

Conversation

eddiemonge
Copy link

As far as I can tell after researching this all morning, semicolons are going to required after properties (yuck) so the example should make it more clear. I know it's nit picky but it makes it clear to me that it is non-standard with almost all other JS and should be explicitly, bluntly, and repeatedly pointed out

@bakkot
Copy link
Contributor

bakkot commented Oct 19, 2018

semicolons are going to required after properties

See #7 (and tc39/proposal-class-public-fields#25 and tc39/proposal-class-public-fields#63 etc). Short version: no, the ASI rules which allow you to elide semicolons elsewhere will continue to apply in class bodies, and class A { x = 1 } will be legal.

@eddiemonge
Copy link
Author

Since tc39/proposal-class-public-fields#63 wasn't closed I thought it was still an open issue. If semicolons aren't required then the code examples should remove them.

@bakkot
Copy link
Contributor

bakkot commented Oct 19, 2018

I thought it was still an open issue

I think that's just so people can find it, but yeah, @littledan maybe that should be closed to avoid this sort of confusion? Edit: beat me to it by thirty seconds!

If semicolons aren't required then the code examples should remove them.

Semicolons aren't required, but let's not bikeshed style here.

@littledan
Copy link
Member

Semicolons are not required, but I'd personally recommend them, but I don't think we need them in a tiny inline example. (Does this make any sense?)

@eddiemonge eddiemonge closed this Oct 24, 2018
@eddiemonge eddiemonge deleted the patch-1 branch October 24, 2018 17:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants