{"action":"created","comment":{"url":"https://api.github.com/repos/edx/edx-ui-toolkit/pulls/comments/65436650","id":65436650,"diff_hunk":"@@ -0,0 +1,165 @@\n+# edX JavaScript Conventions\n+\n+# TODO\n+\n+I'm looking for widespread agreement on everything contained in this document!\n+In particular, I'd love feedback on the [Goals](#goals), [Style](#style), and\n+[Conventions](#conventions) sections.\n+\n+Here are a few things that would be awesome to have:\n+- [ ] define and link to a jshint/jscs/eslint config\n+- [ ] clarify path towards ES2015\n+\n+## Motivation\n+\n+Code conventions are important.  It helps us intuitively approach new code,\n+revisit old code, and share code with others.\n+\n+## Goals\n+\n+We hope to write JavaScript which is:\n+\n+1. Legible\n+2. Friendly\n+3. Predictable\n+4. Semantic\n+\n+## About\n+\n+This guide is split up into two sections - [Style](#style) and\n+[Conventions](#conventions).  The style section addresses aesthetic topics,\n+while the conventions section addresses topics that have more semantic\n+significance.\n+\n+## Note: ECMAScript Version\n+\n+Currently, edX only supports ES5.  In order to implement modules, we use AMD by\n+way of [RequireJS](http://requirejs.org/).  We are moving towards ES2015\n+however, and this guide will be updated when we get there.\n+\n+## Style\n+### Indentation\n+\n+All JavaScript should be indented with 4 spaces.  edX uses this standard\n+throughout our Python, HTML, SASS/CSS, and JavaScript code.\n+\n+e.g.\n+\n+```javascript\n+function sayHello (name) {\n+    return 'Hello, ' + name;\n+}\n+```\n+\n+### Semicolons\n+\n+Use them!\n+\n+### Line Length\n+\n+Break lines at `120` columns.","path":"style-guide.md","position":60,"original_position":60,"commit_id":"057e75e1cf3a3aaf13edee9665f6c14c6b8e8b4c","original_commit_id":"057e75e1cf3a3aaf13edee9665f6c14c6b8e8b4c","user":{"login":"dan-f","id":2146312,"avatar_url":"https://avatars.githubusercontent.com/u/2146312?v=3","gravatar_id":"","url":"https://api.github.com/users/dan-f","html_url":"https://github.com/dan-f","followers_url":"https://api.github.com/users/dan-f/followers","following_url":"https://api.github.com/users/dan-f/following{/other_user}","gists_url":"https://api.github.com/users/dan-f/gists{/gist_id}","starred_url":"https://api.github.com/users/dan-f/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dan-f/subscriptions","organizations_url":"https://api.github.com/users/dan-f/orgs","repos_url":"https://api.github.com/users/dan-f/repos","events_url":"https://api.github.com/users/dan-f/events{/privacy}","received_events_url":"https://api.github.com/users/dan-f/received_events","type":"User","site_admin":false},"body":"Good call!","created_at":"2016-06-01T20:32:23Z","updated_at":"2016-06-01T20:32:23Z","html_url":"https://github.com/edx/edx-ui-toolkit/pull/71#discussion_r65436650","pull_request_url":"https://api.github.com/repos/edx/edx-ui-toolkit/pulls/71","_links":{"self":{"href":"https://api.github.com/repos/edx/edx-ui-toolkit/pulls/comments/65436650"},"html":{"href":"https://github.com/edx/edx-ui-toolkit/pull/71#discussion_r65436650"},"pull_request":{"href":"https://api.github.com/repos/edx/edx-ui-toolkit/pulls/71"}}},"pull_request":{"url":"https://api.github.com/repos/edx/edx-ui-toolkit/pulls/71","id":72244137,"html_url":"https://github.com/edx/edx-ui-toolkit/pull/71","diff_url":"https://github.com/edx/edx-ui-toolkit/pull/71.diff","patch_url":"https://github.com/edx/edx-ui-toolkit/pull/71.patch","issue_url":"https://api.github.com/repos/edx/edx-ui-toolkit/issues/71","number":71,"state":"open","locked":false,"title":"Add a style/conventions guide for writing JS","user":{"login":"dan-f","id":2146312,"avatar_url":"https://avatars.githubusercontent.com/u/2146312?v=3","gravatar_id":"","url":"https://api.github.com/users/dan-f","html_url":"https://github.com/dan-f","followers_url":"https://api.github.com/users/dan-f/followers","following_url":"https://api.github.com/users/dan-f/following{/other_user}","gists_url":"https://api.github.com/users/dan-f/gists{/gist_id}","starred_url":"https://api.github.com/users/dan-f/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dan-f/subscriptions","organizations_url":"https://api.github.com/users/dan-f/orgs","repos_url":"https://api.github.com/users/dan-f/repos","events_url":"https://api.github.com/users/dan-f/events{/privacy}","received_events_url":"https://api.github.com/users/dan-f/received_events","type":"User","site_admin":false},"body":"## Description\r\n\r\nI wanted to take an initial attempt at addressing https://github.com/edx/edx-ui-toolkit/issues/32. I understand that this guide may eventually live in a wiki somewhere, but it seemed appropriate to develop it here for now.\r\n\r\nMy goal is that once people agree on the guide we can then worry about implementation details of how to \"deploy\" it.\r\n\r\n## Reviewers\r\n- [ ] @dsjen\r\n- [ ] @bjacobel \r\n- [ ] @andy-armstrong \r\n- [ ] @pdesjardins \r\n\r\n... and everyone else. I really want this to have the 👍  from an audience much broader than just FEDX.\r\n","created_at":"2016-06-01T20:11:20Z","updated_at":"2016-06-01T20:32:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5adc48e767ae3682a8004d4a38030f4f11598ae7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/edx/edx-ui-toolkit/pulls/71/commits","review_comments_url":"https://api.github.com/repos/edx/edx-ui-toolkit/pulls/71/comments","review_comment_url":"https://api.github.com/repos/edx/edx-ui-toolkit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/edx/edx-ui-toolkit/issues/71/comments","statuses_url":"https://api.github.com/repos/edx/edx-ui-toolkit/statuses/057e75e1cf3a3aaf13edee9665f6c14c6b8e8b4c","head":{"label":"edx:dan-f/introduce-style-guide","ref":"dan-f/introduce-style-guide","sha":"057e75e1cf3a3aaf13edee9665f6c14c6b8e8b4c","user":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"repo":{"id":40644985,"name":"edx-ui-toolkit","full_name":"edx/edx-ui-toolkit","owner":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/edx/edx-ui-toolkit","description":"","fork":false,"url":"https://api.github.com/repos/edx/edx-ui-toolkit","forks_url":"https://api.github.com/repos/edx/edx-ui-toolkit/forks","keys_url":"https://api.github.com/repos/edx/edx-ui-toolkit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx/edx-ui-toolkit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx/edx-ui-toolkit/teams","hooks_url":"https://api.github.com/repos/edx/edx-ui-toolkit/hooks","issue_events_url":"https://api.github.com/repos/edx/edx-ui-toolkit/issues/events{/number}","events_url":"https://api.github.com/repos/edx/edx-ui-toolkit/events","assignees_url":"https://api.github.com/repos/edx/edx-ui-toolkit/assignees{/user}","branches_url":"https://api.github.com/repos/edx/edx-ui-toolkit/branches{/branch}","tags_url":"https://api.github.com/repos/edx/edx-ui-toolkit/tags","blobs_url":"https://api.github.com/repos/edx/edx-ui-toolkit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx/edx-ui-toolkit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx/edx-ui-toolkit/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx/edx-ui-toolkit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx/edx-ui-toolkit/statuses/{sha}","languages_url":"https://api.github.com/repos/edx/edx-ui-toolkit/languages","stargazers_url":"https://api.github.com/repos/edx/edx-ui-toolkit/stargazers","contributors_url":"https://api.github.com/repos/edx/edx-ui-toolkit/contributors","subscribers_url":"https://api.github.com/repos/edx/edx-ui-toolkit/subscribers","subscription_url":"https://api.github.com/repos/edx/edx-ui-toolkit/subscription","commits_url":"https://api.github.com/repos/edx/edx-ui-toolkit/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx/edx-ui-toolkit/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx/edx-ui-toolkit/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx/edx-ui-toolkit/issues/comments{/number}","contents_url":"https://api.github.com/repos/edx/edx-ui-toolkit/contents/{+path}","compare_url":"https://api.github.com/repos/edx/edx-ui-toolkit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx/edx-ui-toolkit/merges","archive_url":"https://api.github.com/repos/edx/edx-ui-toolkit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx/edx-ui-toolkit/downloads","issues_url":"https://api.github.com/repos/edx/edx-ui-toolkit/issues{/number}","pulls_url":"https://api.github.com/repos/edx/edx-ui-toolkit/pulls{/number}","milestones_url":"https://api.github.com/repos/edx/edx-ui-toolkit/milestones{/number}","notifications_url":"https://api.github.com/repos/edx/edx-ui-toolkit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx/edx-ui-toolkit/labels{/name}","releases_url":"https://api.github.com/repos/edx/edx-ui-toolkit/releases{/id}","deployments_url":"https://api.github.com/repos/edx/edx-ui-toolkit/deployments","created_at":"2015-08-13T07:28:13Z","updated_at":"2016-05-18T13:23:17Z","pushed_at":"2016-06-01T20:11:20Z","git_url":"git://github.com/edx/edx-ui-toolkit.git","ssh_url":"git@github.com:edx/edx-ui-toolkit.git","clone_url":"https://github.com/edx/edx-ui-toolkit.git","svn_url":"https://github.com/edx/edx-ui-toolkit","homepage":null,"size":1992,"stargazers_count":7,"watchers_count":7,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":4,"mirror_url":null,"open_issues_count":2,"forks":4,"open_issues":2,"watchers":7,"default_branch":"master"}},"base":{"label":"edx:master","ref":"master","sha":"3b79e8b050aa29f05b8170525d2ede8c5d8fa250","user":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"repo":{"id":40644985,"name":"edx-ui-toolkit","full_name":"edx/edx-ui-toolkit","owner":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/edx/edx-ui-toolkit","description":"","fork":false,"url":"https://api.github.com/repos/edx/edx-ui-toolkit","forks_url":"https://api.github.com/repos/edx/edx-ui-toolkit/forks","keys_url":"https://api.github.com/repos/edx/edx-ui-toolkit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx/edx-ui-toolkit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx/edx-ui-toolkit/teams","hooks_url":"https://api.github.com/repos/edx/edx-ui-toolkit/hooks","issue_events_url":"https://api.github.com/repos/edx/edx-ui-toolkit/issues/events{/number}","events_url":"https://api.github.com/repos/edx/edx-ui-toolkit/events","assignees_url":"https://api.github.com/repos/edx/edx-ui-toolkit/assignees{/user}","branches_url":"https://api.github.com/repos/edx/edx-ui-toolkit/branches{/branch}","tags_url":"https://api.github.com/repos/edx/edx-ui-toolkit/tags","blobs_url":"https://api.github.com/repos/edx/edx-ui-toolkit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx/edx-ui-toolkit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx/edx-ui-toolkit/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx/edx-ui-toolkit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx/edx-ui-toolkit/statuses/{sha}","languages_url":"https://api.github.com/repos/edx/edx-ui-toolkit/languages","stargazers_url":"https://api.github.com/repos/edx/edx-ui-toolkit/stargazers","contributors_url":"https://api.github.com/repos/edx/edx-ui-toolkit/contributors","subscribers_url":"https://api.github.com/repos/edx/edx-ui-toolkit/subscribers","subscription_url":"https://api.github.com/repos/edx/edx-ui-toolkit/subscription","commits_url":"https://api.github.com/repos/edx/edx-ui-toolkit/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx/edx-ui-toolkit/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx/edx-ui-toolkit/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx/edx-ui-toolkit/issues/comments{/number}","contents_url":"https://api.github.com/repos/edx/edx-ui-toolkit/contents/{+path}","compare_url":"https://api.github.com/repos/edx/edx-ui-toolkit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx/edx-ui-toolkit/merges","archive_url":"https://api.github.com/repos/edx/edx-ui-toolkit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx/edx-ui-toolkit/downloads","issues_url":"https://api.github.com/repos/edx/edx-ui-toolkit/issues{/number}","pulls_url":"https://api.github.com/repos/edx/edx-ui-toolkit/pulls{/number}","milestones_url":"https://api.github.com/repos/edx/edx-ui-toolkit/milestones{/number}","notifications_url":"https://api.github.com/repos/edx/edx-ui-toolkit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx/edx-ui-toolkit/labels{/name}","releases_url":"https://api.github.com/repos/edx/edx-ui-toolkit/releases{/id}","deployments_url":"https://api.github.com/repos/edx/edx-ui-toolkit/deployments","created_at":"2015-08-13T07:28:13Z","updated_at":"2016-05-18T13:23:17Z","pushed_at":"2016-06-01T20:11:20Z","git_url":"git://github.com/edx/edx-ui-toolkit.git","ssh_url":"git@github.com:edx/edx-ui-toolkit.git","clone_url":"https://github.com/edx/edx-ui-toolkit.git","svn_url":"https://github.com/edx/edx-ui-toolkit","homepage":null,"size":1992,"stargazers_count":7,"watchers_count":7,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":4,"mirror_url":null,"open_issues_count":2,"forks":4,"open_issues":2,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/edx/edx-ui-toolkit/pulls/71"},"html":{"href":"https://github.com/edx/edx-ui-toolkit/pull/71"},"issue":{"href":"https://api.github.com/repos/edx/edx-ui-toolkit/issues/71"},"comments":{"href":"https://api.github.com/repos/edx/edx-ui-toolkit/issues/71/comments"},"review_comments":{"href":"https://api.github.com/repos/edx/edx-ui-toolkit/pulls/71/comments"},"review_comment":{"href":"https://api.github.com/repos/edx/edx-ui-toolkit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/edx/edx-ui-toolkit/pulls/71/commits"},"statuses":{"href":"https://api.github.com/repos/edx/edx-ui-toolkit/statuses/057e75e1cf3a3aaf13edee9665f6c14c6b8e8b4c"}}}}
{"actor":{"display_login":"dan-f"}}