{"action":"closed","number":61,"pull_request":{"url":"https://api.github.com/repos/AmpersandJS/ampersand-state/pulls/61","id":20660732,"html_url":"https://github.com/AmpersandJS/ampersand-state/pull/61","diff_url":"https://github.com/AmpersandJS/ampersand-state/pull/61.diff","patch_url":"https://github.com/AmpersandJS/ampersand-state/pull/61.patch","issue_url":"https://api.github.com/repos/AmpersandJS/ampersand-state/issues/61","number":61,"state":"closed","locked":false,"title":"Refactoring: remove unused variables and update tests.","user":{"login":"francismakes","id":2647488,"avatar_url":"https://avatars.githubusercontent.com/u/2647488?v=3","gravatar_id":"","url":"https://api.github.com/users/francismakes","html_url":"https://github.com/francismakes","followers_url":"https://api.github.com/users/francismakes/followers","following_url":"https://api.github.com/users/francismakes/following{/other_user}","gists_url":"https://api.github.com/users/francismakes/gists{/gist_id}","starred_url":"https://api.github.com/users/francismakes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/francismakes/subscriptions","organizations_url":"https://api.github.com/users/francismakes/orgs","repos_url":"https://api.github.com/users/francismakes/repos","events_url":"https://api.github.com/users/francismakes/events{/privacy}","received_events_url":"https://api.github.com/users/francismakes/received_events","type":"User","site_admin":false},"body":":wave: Hello &yet! \r\n\r\nAfter going through the code, I found some parts of the base that could be refactored.\r\n\r\nIssue 1: After adding `unused: true` to the `.jshintrc`, there are defined but unused variables.\r\n\r\n```sh\r\nampersand-state.js\r\n  line 78   col 28  'options' is defined but never used.\r\n  line 101  col 13  'triggers' is defined but never used.\r\n  line 298  col 13  'type' is defined but never used.\r\n  line 680  col 9   'prop' is defined but never used.\r\n  line 680  col 15  'item' is defined but never used.\r\n  line 753  col 9   'toString' is defined but never used.\r\n\r\ntest/basics.js\r\n  line 130   col 51  'value' is defined but never used.\r\n  line 130   col 44  'model' is defined but never used.\r\n  line 520   col 9   'lastError' is defined but never used.\r\n  line 531   col 42  'error' is defined but never used.\r\n  line 531   col 35  'model' is defined but never used.\r\n\r\ntest/full.js\r\n  line 244   col 9   'one' is defined but never used.\r\n  line 601   col 44  'newVal' is defined but never used.\r\n  line 601   col 36  'oldVal' is defined but never used.\r\n  line 800   col 9   'thing' is defined but never used.\r\n  line 1133  col 9   'sub2' is defined but never used.\r\n  line 1261  col 9   'emptyattrs' is defined but never used.\r\n  line 1262  col 9   'undefinedattrs' is defined but never used.\r\n  line 1257  col 39  'opts' is defined but never used.\r\n  line 1332  col 9   'model' is defined but never used.\r\n```\r\n\r\nIssue 2: Because I have set `unused: true`, the tests pass but `jshint` complains because there are variables which are defined but are not used. Within the test, the respective values assigned to the variables are the ones being examined under `testling`.\r\n\r\nIssue 3: The test for Issue #1791 is [missing an assertion](https://github.com/francismakes/ampersand-state/compare/AmpersandJS:master...francismakes:master#diff-d52eeda9ba89df3f626cf88a2d2a1879L1330).\r\n\r\nIssue 4: Some tests are missing a `t.plan(#)`.\r\n\r\nIssue 5: Some test titles are wrapped in double quotes instead of single quotes (not that it really matters...)\r\n\r\n\r\nThis PR:\r\n1. Includes an updated `.jshintrc` with `unused` set to true;\r\n2. Use instances directly without variable assignments (see [here](https://github.com/francismakes/ampersand-state/compare/AmpersandJS:master...francismakes:master#diff-d52eeda9ba89df3f626cf88a2d2a1879R836) and [here](https://github.com/francismakes/ampersand-state/compare/AmpersandJS:master...francismakes:master#diff-d52eeda9ba89df3f626cf88a2d2a1879R1304));\r\n3. Includes `t.plan(#)` where missing; and\r\n4. Updates any and all test names wrapped in double quotes to single quotes.\r\n\r\nI didn't see a contributing guide, but am inclined to make the needed revisions where necessary. Please let me know if I'm missing anything too. Thanks in advance!\r\n","created_at":"2014-09-03T07:54:54Z","updated_at":"2015-11-03T11:10:10Z","closed_at":"2015-11-03T11:10:10Z","merged_at":null,"merge_commit_sha":"0844a4d58b2477f1b0fa5a4c461e778dca3b7a2f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/AmpersandJS/ampersand-state/pulls/61/commits","review_comments_url":"https://api.github.com/repos/AmpersandJS/ampersand-state/pulls/61/comments","review_comment_url":"https://api.github.com/repos/AmpersandJS/ampersand-state/pulls/comments{/number}","comments_url":"https://api.github.com/repos/AmpersandJS/ampersand-state/issues/61/comments","statuses_url":"https://api.github.com/repos/AmpersandJS/ampersand-state/statuses/675520406d7b4dd132c17060de031265a364f7a5","head":{"label":"francismakes:master","ref":"master","sha":"675520406d7b4dd132c17060de031265a364f7a5","user":{"login":"francismakes","id":2647488,"avatar_url":"https://avatars.githubusercontent.com/u/2647488?v=3","gravatar_id":"","url":"https://api.github.com/users/francismakes","html_url":"https://github.com/francismakes","followers_url":"https://api.github.com/users/francismakes/followers","following_url":"https://api.github.com/users/francismakes/following{/other_user}","gists_url":"https://api.github.com/users/francismakes/gists{/gist_id}","starred_url":"https://api.github.com/users/francismakes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/francismakes/subscriptions","organizations_url":"https://api.github.com/users/francismakes/orgs","repos_url":"https://api.github.com/users/francismakes/repos","events_url":"https://api.github.com/users/francismakes/events{/privacy}","received_events_url":"https://api.github.com/users/francismakes/received_events","type":"User","site_admin":false},"repo":{"id":23608086,"name":"ampersand-state","full_name":"francismakes/ampersand-state","owner":{"login":"francismakes","id":2647488,"avatar_url":"https://avatars.githubusercontent.com/u/2647488?v=3","gravatar_id":"","url":"https://api.github.com/users/francismakes","html_url":"https://github.com/francismakes","followers_url":"https://api.github.com/users/francismakes/followers","following_url":"https://api.github.com/users/francismakes/following{/other_user}","gists_url":"https://api.github.com/users/francismakes/gists{/gist_id}","starred_url":"https://api.github.com/users/francismakes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/francismakes/subscriptions","organizations_url":"https://api.github.com/users/francismakes/orgs","repos_url":"https://api.github.com/users/francismakes/repos","events_url":"https://api.github.com/users/francismakes/events{/privacy}","received_events_url":"https://api.github.com/users/francismakes/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/francismakes/ampersand-state","description":"Core state management object.","fork":true,"url":"https://api.github.com/repos/francismakes/ampersand-state","forks_url":"https://api.github.com/repos/francismakes/ampersand-state/forks","keys_url":"https://api.github.com/repos/francismakes/ampersand-state/keys{/key_id}","collaborators_url":"https://api.github.com/repos/francismakes/ampersand-state/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/francismakes/ampersand-state/teams","hooks_url":"https://api.github.com/repos/francismakes/ampersand-state/hooks","issue_events_url":"https://api.github.com/repos/francismakes/ampersand-state/issues/events{/number}","events_url":"https://api.github.com/repos/francismakes/ampersand-state/events","assignees_url":"https://api.github.com/repos/francismakes/ampersand-state/assignees{/user}","branches_url":"https://api.github.com/repos/francismakes/ampersand-state/branches{/branch}","tags_url":"https://api.github.com/repos/francismakes/ampersand-state/tags","blobs_url":"https://api.github.com/repos/francismakes/ampersand-state/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/francismakes/ampersand-state/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/francismakes/ampersand-state/git/refs{/sha}","trees_url":"https://api.github.com/repos/francismakes/ampersand-state/git/trees{/sha}","statuses_url":"https://api.github.com/repos/francismakes/ampersand-state/statuses/{sha}","languages_url":"https://api.github.com/repos/francismakes/ampersand-state/languages","stargazers_url":"https://api.github.com/repos/francismakes/ampersand-state/stargazers","contributors_url":"https://api.github.com/repos/francismakes/ampersand-state/contributors","subscribers_url":"https://api.github.com/repos/francismakes/ampersand-state/subscribers","subscription_url":"https://api.github.com/repos/francismakes/ampersand-state/subscription","commits_url":"https://api.github.com/repos/francismakes/ampersand-state/commits{/sha}","git_commits_url":"https://api.github.com/repos/francismakes/ampersand-state/git/commits{/sha}","comments_url":"https://api.github.com/repos/francismakes/ampersand-state/comments{/number}","issue_comment_url":"https://api.github.com/repos/francismakes/ampersand-state/issues/comments{/number}","contents_url":"https://api.github.com/repos/francismakes/ampersand-state/contents/{+path}","compare_url":"https://api.github.com/repos/francismakes/ampersand-state/compare/{base}...{head}","merges_url":"https://api.github.com/repos/francismakes/ampersand-state/merges","archive_url":"https://api.github.com/repos/francismakes/ampersand-state/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/francismakes/ampersand-state/downloads","issues_url":"https://api.github.com/repos/francismakes/ampersand-state/issues{/number}","pulls_url":"https://api.github.com/repos/francismakes/ampersand-state/pulls{/number}","milestones_url":"https://api.github.com/repos/francismakes/ampersand-state/milestones{/number}","notifications_url":"https://api.github.com/repos/francismakes/ampersand-state/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/francismakes/ampersand-state/labels{/name}","releases_url":"https://api.github.com/repos/francismakes/ampersand-state/releases{/id}","created_at":"2014-09-03T05:46:52Z","updated_at":"2014-12-05T16:05:27Z","pushed_at":"2014-12-05T16:05:27Z","git_url":"git://github.com/francismakes/ampersand-state.git","ssh_url":"git@github.com:francismakes/ampersand-state.git","clone_url":"https://github.com/francismakes/ampersand-state.git","svn_url":"https://github.com/francismakes/ampersand-state","homepage":null,"size":310,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"AmpersandJS:master","ref":"master","sha":"e7dfb3032cb7bfead09e9f934e7cc5919b619120","user":{"login":"AmpersandJS","id":6932645,"avatar_url":"https://avatars.githubusercontent.com/u/6932645?v=3","gravatar_id":"","url":"https://api.github.com/users/AmpersandJS","html_url":"https://github.com/AmpersandJS","followers_url":"https://api.github.com/users/AmpersandJS/followers","following_url":"https://api.github.com/users/AmpersandJS/following{/other_user}","gists_url":"https://api.github.com/users/AmpersandJS/gists{/gist_id}","starred_url":"https://api.github.com/users/AmpersandJS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AmpersandJS/subscriptions","organizations_url":"https://api.github.com/users/AmpersandJS/orgs","repos_url":"https://api.github.com/users/AmpersandJS/repos","events_url":"https://api.github.com/users/AmpersandJS/events{/privacy}","received_events_url":"https://api.github.com/users/AmpersandJS/received_events","type":"Organization","site_admin":false},"repo":{"id":17815177,"name":"ampersand-state","full_name":"AmpersandJS/ampersand-state","owner":{"login":"AmpersandJS","id":6932645,"avatar_url":"https://avatars.githubusercontent.com/u/6932645?v=3","gravatar_id":"","url":"https://api.github.com/users/AmpersandJS","html_url":"https://github.com/AmpersandJS","followers_url":"https://api.github.com/users/AmpersandJS/followers","following_url":"https://api.github.com/users/AmpersandJS/following{/other_user}","gists_url":"https://api.github.com/users/AmpersandJS/gists{/gist_id}","starred_url":"https://api.github.com/users/AmpersandJS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AmpersandJS/subscriptions","organizations_url":"https://api.github.com/users/AmpersandJS/orgs","repos_url":"https://api.github.com/users/AmpersandJS/repos","events_url":"https://api.github.com/users/AmpersandJS/events{/privacy}","received_events_url":"https://api.github.com/users/AmpersandJS/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AmpersandJS/ampersand-state","description":"Core state management object.","fork":false,"url":"https://api.github.com/repos/AmpersandJS/ampersand-state","forks_url":"https://api.github.com/repos/AmpersandJS/ampersand-state/forks","keys_url":"https://api.github.com/repos/AmpersandJS/ampersand-state/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AmpersandJS/ampersand-state/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AmpersandJS/ampersand-state/teams","hooks_url":"https://api.github.com/repos/AmpersandJS/ampersand-state/hooks","issue_events_url":"https://api.github.com/repos/AmpersandJS/ampersand-state/issues/events{/number}","events_url":"https://api.github.com/repos/AmpersandJS/ampersand-state/events","assignees_url":"https://api.github.com/repos/AmpersandJS/ampersand-state/assignees{/user}","branches_url":"https://api.github.com/repos/AmpersandJS/ampersand-state/branches{/branch}","tags_url":"https://api.github.com/repos/AmpersandJS/ampersand-state/tags","blobs_url":"https://api.github.com/repos/AmpersandJS/ampersand-state/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AmpersandJS/ampersand-state/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AmpersandJS/ampersand-state/git/refs{/sha}","trees_url":"https://api.github.com/repos/AmpersandJS/ampersand-state/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AmpersandJS/ampersand-state/statuses/{sha}","languages_url":"https://api.github.com/repos/AmpersandJS/ampersand-state/languages","stargazers_url":"https://api.github.com/repos/AmpersandJS/ampersand-state/stargazers","contributors_url":"https://api.github.com/repos/AmpersandJS/ampersand-state/contributors","subscribers_url":"https://api.github.com/repos/AmpersandJS/ampersand-state/subscribers","subscription_url":"https://api.github.com/repos/AmpersandJS/ampersand-state/subscription","commits_url":"https://api.github.com/repos/AmpersandJS/ampersand-state/commits{/sha}","git_commits_url":"https://api.github.com/repos/AmpersandJS/ampersand-state/git/commits{/sha}","comments_url":"https://api.github.com/repos/AmpersandJS/ampersand-state/comments{/number}","issue_comment_url":"https://api.github.com/repos/AmpersandJS/ampersand-state/issues/comments{/number}","contents_url":"https://api.github.com/repos/AmpersandJS/ampersand-state/contents/{+path}","compare_url":"https://api.github.com/repos/AmpersandJS/ampersand-state/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AmpersandJS/ampersand-state/merges","archive_url":"https://api.github.com/repos/AmpersandJS/ampersand-state/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AmpersandJS/ampersand-state/downloads","issues_url":"https://api.github.com/repos/AmpersandJS/ampersand-state/issues{/number}","pulls_url":"https://api.github.com/repos/AmpersandJS/ampersand-state/pulls{/number}","milestones_url":"https://api.github.com/repos/AmpersandJS/ampersand-state/milestones{/number}","notifications_url":"https://api.github.com/repos/AmpersandJS/ampersand-state/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AmpersandJS/ampersand-state/labels{/name}","releases_url":"https://api.github.com/repos/AmpersandJS/ampersand-state/releases{/id}","created_at":"2014-03-17T02:39:05Z","updated_at":"2015-10-22T06:55:46Z","pushed_at":"2015-11-03T11:10:09Z","git_url":"git://github.com/AmpersandJS/ampersand-state.git","ssh_url":"git@github.com:AmpersandJS/ampersand-state.git","clone_url":"https://github.com/AmpersandJS/ampersand-state.git","svn_url":"https://github.com/AmpersandJS/ampersand-state","homepage":null,"size":2051,"stargazers_count":94,"watchers_count":94,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":64,"mirror_url":null,"open_issues_count":39,"forks":64,"open_issues":39,"watchers":94,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/AmpersandJS/ampersand-state/pulls/61"},"html":{"href":"https://github.com/AmpersandJS/ampersand-state/pull/61"},"issue":{"href":"https://api.github.com/repos/AmpersandJS/ampersand-state/issues/61"},"comments":{"href":"https://api.github.com/repos/AmpersandJS/ampersand-state/issues/61/comments"},"review_comments":{"href":"https://api.github.com/repos/AmpersandJS/ampersand-state/pulls/61/comments"},"review_comment":{"href":"https://api.github.com/repos/AmpersandJS/ampersand-state/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/AmpersandJS/ampersand-state/pulls/61/commits"},"statuses":{"href":"https://api.github.com/repos/AmpersandJS/ampersand-state/statuses/675520406d7b4dd132c17060de031265a364f7a5"}},"merged":false,"mergeable":false,"mergeable_state":"dirty","merged_by":null,"comments":8,"review_comments":1,"commits":6,"additions":38,"deletions":30,"changed_files":4}}