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

Extra semicolon error after Use Strict Directive #1024

Closed
LucaFranceschini opened this issue Dec 7, 2017 · 2 comments

Comments

@LucaFranceschini
Copy link

commented Dec 7, 2017

Standard warns about correct use of semicolon after Use Strict Directive at the script-level:

'use strict';
1:13: Extra semicolon.

However, the semicolon is not only correct but mandatory: https://tc39.github.io/ecma262/#directive-prologue.

Can't find much about this. What am I missing?

@dougwilson

This comment has been minimized.

Copy link

commented Dec 7, 2017

From your link:

The semicolon may appear explicitly or may be inserted by automatic semicolon insertion.

@LucaFranceschini

This comment has been minimized.

Copy link
Author

commented Dec 7, 2017

Oh, that's definitely something I was missing, thanks.
(funny, I often see the semicolon version even in examples using a no-semicolon style...)

@lock lock bot locked as resolved and limited conversation to collaborators May 25, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
2 participants
You can’t perform that action at this time.