Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Javascript source should start with a semicolon #138

titos1 opened this Issue Jun 27, 2013 · 3 comments


None yet
2 participants

titos1 commented Jun 27, 2013

...to prevent conflicting with other plugins in the same file:

;(function (factory) { ...


rmm5t commented Jun 28, 2013

Same file?

How about JavaScript source just end with a semicolon?

On Thursday, June 27, 2013, titos1 wrote:

...to prevent conflicting with other plugins in the same file:

;(function (factory) {

Reply to this email directly or view it on GitHubhttps://github.com/rmm5t/jquery-timeago/issues/138


rmm5t commented Jul 1, 2013

That blog post isn't compelling enough for me. I know this probably seems like a minor thing, but it's not something I want to guarantee for future compatibility. Not to mention, beginning a library with a semi-colon sounds like an anti-pattern.

Alternative ideas:

  1. Go open issues with the other libraries that don't end with a semi-colon.
  2. Go open issues with the concatenation libraries that don't auto include a semi-colon between concatenations.

@rmm5t rmm5t closed this Jul 1, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment