Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upunnecessary semicolon #70
Comments
This comment has been minimized.
This comment has been minimized.
|
Thanks for the nice words :) You're right – this is a weird edge case and it's inconsistent. In the second example eslint is complaining because |
feross
closed this
in
de02f0b
Mar 18, 2015
This comment has been minimized.
This comment has been minimized.
|
Released as 3.1.2. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
jprichardson commentedMar 18, 2015
Consider this program:
Runs fine, no
standarderrors either.Now consider this program:
Runs fine, but
standardprints theunnecessary semicolonerror. Whilestandardis indeed correct that the program and IIFE is fine without the semicolon prefix, the rule seems to be a bit too tight in this context. By default, I always prefix my IIFE with a;so that I don't have to think of the contextual situations when it's necessary and when it is not. Do others do this? Is this a rule that should be relaxed? I'm guessing it's aneslintchange.Either way, this feels pretty low-priority to the other standard issues, but I thought that I'd bring it up for discussion.
Loving
standardbtw :)