GitHub PullRequestReviewCommentEvent at 2014-01-30 06:37:43
Repository: guidelines
Actor: lizlux
Payload: {"comment":{"url":"https://api.github.com/repos/Wikia/guidelines/pulls/comments/9296946","id":9296946,"diff_hunk":"@@ -557,6 +558,20 @@ All library files should go inside 'lib' folders. This will make it easier for J\n \n All re-usable JavaScript should be written as AMD modules. See the [above section](#amd-modules) for matching file names to module names.\n \n+### Immediately Invoked Function Expressions (IIFE)\n+\n+Wrap all immediately invoked function expressions with parentheses\n+\n+```javascript\n+\n+// good\n+var a = ( function() { return 1; } )(),\n+\tb = ( function() { return 2; }() );","path":"JSCodingConventions.md","position":20,"original_position":20,"commit_id":"c75fe5239c0a18a3917c50cd8491e55d0d7f6db3","original_commit_id":"c75fe5239c0a18a3917c50cd8491e55d0d7f6db3","user":{"login":"lizlux","id":201367,"avatar_url":"https://gravatar.com/avatar/7f8d618e4ca6bcce7748e3b2fa1fff98?d=https%3A%2F%2Fidenticons.github.com%2F46c4d97c7f84faabe299350cb33f6e4d.png&r=x","gravatar_id":"7f8d618e4ca6bcce7748e3b2fa1fff98","url":"https://api.github.com/users/lizlux","html_url":"https://github.com/lizlux","followers_url":"https://api.github.com/users/lizlux/followers","following_url":"https://api.github.com/users/lizlux/following{/other_user}","gists_url":"https://api.github.com/users/lizlux/gists{/gist_id}","starred_url":"https://api.github.com/users/lizlux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lizlux/subscriptions","organizations_url":"https://api.github.com/users/lizlux/orgs","repos_url":"https://api.github.com/users/lizlux/repos","events_url":"https://api.github.com/users/lizlux/events{/privacy}","received_events_url":"https://api.github.com/users/lizlux/received_events","type":"User","site_admin":false},"body":"@BladeBronson @kenkouot @kflorence, I updated this to include the second option of wrapping the whole expression in parentheses. It's in line with https://npmjs.org/package/jscs requireParenthesesAroundIIFE ","created_at":"2014-01-30T06:37:43Z","updated_at":"2014-01-30T06:37:43Z","html_url":"https://github.com/Wikia/guidelines/pull/3#discussion_r9296946","pull_request_url":"https://api.github.com/repos/Wikia/guidelines/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/Wikia/guidelines/pulls/comments/9296946"},"html":{"href":"https://github.com/Wikia/guidelines/pull/3#discussion_r9296946"},"pull_request":{"href":"https://api.github.com/repos/Wikia/guidelines/pulls/3"}}}}