{"action":"created","comment":{"url":"https://api.github.com/repos/jscs-dev/node-jscs/pulls/comments/31873003","id":31873003,"diff_hunk":"@@ -8,27 +8,43 @@ var fs = require('fs');\n describe('modules/js-file', function() {\n \n     function createJsFile(sources, options) {\n-        return new JsFile(\n-            'example.js',\n-            sources,\n-            JsFile.parse(sources, esprima),\n-            options || {}\n-        );\n+        var params = {\n+            filename: 'example.js',\n+            source: sources,\n+            esprima: esprima\n+        };\n+\n+        for (var i in options) {","path":"test/specs/js-file.js","position":16,"original_position":16,"commit_id":"184bbc6ec9bce59c09644fc55d97633f4842c3e8","original_commit_id":"184bbc6ec9bce59c09644fc55d97633f4842c3e8","user":{"login":"mrjoelkemp","id":865203,"avatar_url":"https://avatars.githubusercontent.com/u/865203?v=3","gravatar_id":"","url":"https://api.github.com/users/mrjoelkemp","html_url":"https://github.com/mrjoelkemp","followers_url":"https://api.github.com/users/mrjoelkemp/followers","following_url":"https://api.github.com/users/mrjoelkemp/following{/other_user}","gists_url":"https://api.github.com/users/mrjoelkemp/gists{/gist_id}","starred_url":"https://api.github.com/users/mrjoelkemp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrjoelkemp/subscriptions","organizations_url":"https://api.github.com/users/mrjoelkemp/orgs","repos_url":"https://api.github.com/users/mrjoelkemp/repos","events_url":"https://api.github.com/users/mrjoelkemp/events{/privacy}","received_events_url":"https://api.github.com/users/mrjoelkemp/received_events","type":"User","site_admin":false},"body":"We already have lodash.assign (https://github.com/jscs-dev/node-jscs/blob/mdevils.jsfile-constructor/package.json#L71), maybe use it here?","created_at":"2015-06-07T01:39:34Z","updated_at":"2015-06-07T01:39:34Z","html_url":"https://github.com/jscs-dev/node-jscs/pull/1433#discussion_r31873003","pull_request_url":"https://api.github.com/repos/jscs-dev/node-jscs/pulls/1433","_links":{"self":{"href":"https://api.github.com/repos/jscs-dev/node-jscs/pulls/comments/31873003"},"html":{"href":"https://github.com/jscs-dev/node-jscs/pull/1433#discussion_r31873003"},"pull_request":{"href":"https://api.github.com/repos/jscs-dev/node-jscs/pulls/1433"}}},"pull_request":{"url":"https://api.github.com/repos/jscs-dev/node-jscs/pulls/1433","id":37089892,"html_url":"https://github.com/jscs-dev/node-jscs/pull/1433","diff_url":"https://github.com/jscs-dev/node-jscs/pull/1433.diff","patch_url":"https://github.com/jscs-dev/node-jscs/pull/1433.patch","issue_url":"https://api.github.com/repos/jscs-dev/node-jscs/issues/1433","number":1433,"state":"open","locked":false,"title":"Improve JsFile constructor for better encapsulation","user":{"login":"mdevils","id":176898,"avatar_url":"https://avatars.githubusercontent.com/u/176898?v=3","gravatar_id":"","url":"https://api.github.com/users/mdevils","html_url":"https://github.com/mdevils","followers_url":"https://api.github.com/users/mdevils/followers","following_url":"https://api.github.com/users/mdevils/following{/other_user}","gists_url":"https://api.github.com/users/mdevils/gists{/gist_id}","starred_url":"https://api.github.com/users/mdevils/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdevils/subscriptions","organizations_url":"https://api.github.com/users/mdevils/orgs","repos_url":"https://api.github.com/users/mdevils/repos","events_url":"https://api.github.com/users/mdevils/events{/privacy}","received_events_url":"https://api.github.com/users/mdevils/received_events","type":"User","site_admin":false},"body":"* Removed `JsFile.parse`.\r\n* Moved parse routines to `JsFile` constructor.\r\n* Added `JsFile:: getParseErrors` method.\r\n* Fixed tests.\r\n* Added tests.\r\n\r\nI need this to implement abstraction on top of different file formats and then implement processing `JS` inlined to `HTML` pages.\r\n\r\n/cc @markelog @zxqfox @mikesherov @mrjoelkemp ","created_at":"2015-06-06T12:40:57Z","updated_at":"2015-06-07T01:39:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9eec039b36493ee4103913fd32345c2aba328bc8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jscs-dev/node-jscs/pulls/1433/commits","review_comments_url":"https://api.github.com/repos/jscs-dev/node-jscs/pulls/1433/comments","review_comment_url":"https://api.github.com/repos/jscs-dev/node-jscs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jscs-dev/node-jscs/issues/1433/comments","statuses_url":"https://api.github.com/repos/jscs-dev/node-jscs/statuses/184bbc6ec9bce59c09644fc55d97633f4842c3e8","head":{"label":"jscs-dev:mdevils.jsfile-constructor","ref":"mdevils.jsfile-constructor","sha":"184bbc6ec9bce59c09644fc55d97633f4842c3e8","user":{"login":"jscs-dev","id":8018201,"avatar_url":"https://avatars.githubusercontent.com/u/8018201?v=3","gravatar_id":"","url":"https://api.github.com/users/jscs-dev","html_url":"https://github.com/jscs-dev","followers_url":"https://api.github.com/users/jscs-dev/followers","following_url":"https://api.github.com/users/jscs-dev/following{/other_user}","gists_url":"https://api.github.com/users/jscs-dev/gists{/gist_id}","starred_url":"https://api.github.com/users/jscs-dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jscs-dev/subscriptions","organizations_url":"https://api.github.com/users/jscs-dev/orgs","repos_url":"https://api.github.com/users/jscs-dev/repos","events_url":"https://api.github.com/users/jscs-dev/events{/privacy}","received_events_url":"https://api.github.com/users/jscs-dev/received_events","type":"Organization","site_admin":false},"repo":{"id":10697582,"name":"node-jscs","full_name":"jscs-dev/node-jscs","owner":{"login":"jscs-dev","id":8018201,"avatar_url":"https://avatars.githubusercontent.com/u/8018201?v=3","gravatar_id":"","url":"https://api.github.com/users/jscs-dev","html_url":"https://github.com/jscs-dev","followers_url":"https://api.github.com/users/jscs-dev/followers","following_url":"https://api.github.com/users/jscs-dev/following{/other_user}","gists_url":"https://api.github.com/users/jscs-dev/gists{/gist_id}","starred_url":"https://api.github.com/users/jscs-dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jscs-dev/subscriptions","organizations_url":"https://api.github.com/users/jscs-dev/orgs","repos_url":"https://api.github.com/users/jscs-dev/repos","events_url":"https://api.github.com/users/jscs-dev/events{/privacy}","received_events_url":"https://api.github.com/users/jscs-dev/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jscs-dev/node-jscs","description":"JavaScript Code Style checker","fork":false,"url":"https://api.github.com/repos/jscs-dev/node-jscs","forks_url":"https://api.github.com/repos/jscs-dev/node-jscs/forks","keys_url":"https://api.github.com/repos/jscs-dev/node-jscs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jscs-dev/node-jscs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jscs-dev/node-jscs/teams","hooks_url":"https://api.github.com/repos/jscs-dev/node-jscs/hooks","issue_events_url":"https://api.github.com/repos/jscs-dev/node-jscs/issues/events{/number}","events_url":"https://api.github.com/repos/jscs-dev/node-jscs/events","assignees_url":"https://api.github.com/repos/jscs-dev/node-jscs/assignees{/user}","branches_url":"https://api.github.com/repos/jscs-dev/node-jscs/branches{/branch}","tags_url":"https://api.github.com/repos/jscs-dev/node-jscs/tags","blobs_url":"https://api.github.com/repos/jscs-dev/node-jscs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jscs-dev/node-jscs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jscs-dev/node-jscs/git/refs{/sha}","trees_url":"https://api.github.com/repos/jscs-dev/node-jscs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jscs-dev/node-jscs/statuses/{sha}","languages_url":"https://api.github.com/repos/jscs-dev/node-jscs/languages","stargazers_url":"https://api.github.com/repos/jscs-dev/node-jscs/stargazers","contributors_url":"https://api.github.com/repos/jscs-dev/node-jscs/contributors","subscribers_url":"https://api.github.com/repos/jscs-dev/node-jscs/subscribers","subscription_url":"https://api.github.com/repos/jscs-dev/node-jscs/subscription","commits_url":"https://api.github.com/repos/jscs-dev/node-jscs/commits{/sha}","git_commits_url":"https://api.github.com/repos/jscs-dev/node-jscs/git/commits{/sha}","comments_url":"https://api.github.com/repos/jscs-dev/node-jscs/comments{/number}","issue_comment_url":"https://api.github.com/repos/jscs-dev/node-jscs/issues/comments{/number}","contents_url":"https://api.github.com/repos/jscs-dev/node-jscs/contents/{+path}","compare_url":"https://api.github.com/repos/jscs-dev/node-jscs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jscs-dev/node-jscs/merges","archive_url":"https://api.github.com/repos/jscs-dev/node-jscs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jscs-dev/node-jscs/downloads","issues_url":"https://api.github.com/repos/jscs-dev/node-jscs/issues{/number}","pulls_url":"https://api.github.com/repos/jscs-dev/node-jscs/pulls{/number}","milestones_url":"https://api.github.com/repos/jscs-dev/node-jscs/milestones{/number}","notifications_url":"https://api.github.com/repos/jscs-dev/node-jscs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jscs-dev/node-jscs/labels{/name}","releases_url":"https://api.github.com/repos/jscs-dev/node-jscs/releases{/id}","created_at":"2013-06-14T20:53:48Z","updated_at":"2015-06-06T11:17:52Z","pushed_at":"2015-06-07T01:37:34Z","git_url":"git://github.com/jscs-dev/node-jscs.git","ssh_url":"git@github.com:jscs-dev/node-jscs.git","clone_url":"https://github.com/jscs-dev/node-jscs.git","svn_url":"https://github.com/jscs-dev/node-jscs","homepage":"http://jscs.info/","size":14075,"stargazers_count":3389,"watchers_count":3389,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":328,"mirror_url":null,"open_issues_count":188,"forks":328,"open_issues":188,"watchers":3389,"default_branch":"master"}},"base":{"label":"jscs-dev:master","ref":"master","sha":"f963cd496d4e5d89bb8ffee9abc1c8114b69f41f","user":{"login":"jscs-dev","id":8018201,"avatar_url":"https://avatars.githubusercontent.com/u/8018201?v=3","gravatar_id":"","url":"https://api.github.com/users/jscs-dev","html_url":"https://github.com/jscs-dev","followers_url":"https://api.github.com/users/jscs-dev/followers","following_url":"https://api.github.com/users/jscs-dev/following{/other_user}","gists_url":"https://api.github.com/users/jscs-dev/gists{/gist_id}","starred_url":"https://api.github.com/users/jscs-dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jscs-dev/subscriptions","organizations_url":"https://api.github.com/users/jscs-dev/orgs","repos_url":"https://api.github.com/users/jscs-dev/repos","events_url":"https://api.github.com/users/jscs-dev/events{/privacy}","received_events_url":"https://api.github.com/users/jscs-dev/received_events","type":"Organization","site_admin":false},"repo":{"id":10697582,"name":"node-jscs","full_name":"jscs-dev/node-jscs","owner":{"login":"jscs-dev","id":8018201,"avatar_url":"https://avatars.githubusercontent.com/u/8018201?v=3","gravatar_id":"","url":"https://api.github.com/users/jscs-dev","html_url":"https://github.com/jscs-dev","followers_url":"https://api.github.com/users/jscs-dev/followers","following_url":"https://api.github.com/users/jscs-dev/following{/other_user}","gists_url":"https://api.github.com/users/jscs-dev/gists{/gist_id}","starred_url":"https://api.github.com/users/jscs-dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jscs-dev/subscriptions","organizations_url":"https://api.github.com/users/jscs-dev/orgs","repos_url":"https://api.github.com/users/jscs-dev/repos","events_url":"https://api.github.com/users/jscs-dev/events{/privacy}","received_events_url":"https://api.github.com/users/jscs-dev/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jscs-dev/node-jscs","description":"JavaScript Code Style checker","fork":false,"url":"https://api.github.com/repos/jscs-dev/node-jscs","forks_url":"https://api.github.com/repos/jscs-dev/node-jscs/forks","keys_url":"https://api.github.com/repos/jscs-dev/node-jscs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jscs-dev/node-jscs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jscs-dev/node-jscs/teams","hooks_url":"https://api.github.com/repos/jscs-dev/node-jscs/hooks","issue_events_url":"https://api.github.com/repos/jscs-dev/node-jscs/issues/events{/number}","events_url":"https://api.github.com/repos/jscs-dev/node-jscs/events","assignees_url":"https://api.github.com/repos/jscs-dev/node-jscs/assignees{/user}","branches_url":"https://api.github.com/repos/jscs-dev/node-jscs/branches{/branch}","tags_url":"https://api.github.com/repos/jscs-dev/node-jscs/tags","blobs_url":"https://api.github.com/repos/jscs-dev/node-jscs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jscs-dev/node-jscs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jscs-dev/node-jscs/git/refs{/sha}","trees_url":"https://api.github.com/repos/jscs-dev/node-jscs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jscs-dev/node-jscs/statuses/{sha}","languages_url":"https://api.github.com/repos/jscs-dev/node-jscs/languages","stargazers_url":"https://api.github.com/repos/jscs-dev/node-jscs/stargazers","contributors_url":"https://api.github.com/repos/jscs-dev/node-jscs/contributors","subscribers_url":"https://api.github.com/repos/jscs-dev/node-jscs/subscribers","subscription_url":"https://api.github.com/repos/jscs-dev/node-jscs/subscription","commits_url":"https://api.github.com/repos/jscs-dev/node-jscs/commits{/sha}","git_commits_url":"https://api.github.com/repos/jscs-dev/node-jscs/git/commits{/sha}","comments_url":"https://api.github.com/repos/jscs-dev/node-jscs/comments{/number}","issue_comment_url":"https://api.github.com/repos/jscs-dev/node-jscs/issues/comments{/number}","contents_url":"https://api.github.com/repos/jscs-dev/node-jscs/contents/{+path}","compare_url":"https://api.github.com/repos/jscs-dev/node-jscs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jscs-dev/node-jscs/merges","archive_url":"https://api.github.com/repos/jscs-dev/node-jscs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jscs-dev/node-jscs/downloads","issues_url":"https://api.github.com/repos/jscs-dev/node-jscs/issues{/number}","pulls_url":"https://api.github.com/repos/jscs-dev/node-jscs/pulls{/number}","milestones_url":"https://api.github.com/repos/jscs-dev/node-jscs/milestones{/number}","notifications_url":"https://api.github.com/repos/jscs-dev/node-jscs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jscs-dev/node-jscs/labels{/name}","releases_url":"https://api.github.com/repos/jscs-dev/node-jscs/releases{/id}","created_at":"2013-06-14T20:53:48Z","updated_at":"2015-06-06T11:17:52Z","pushed_at":"2015-06-07T01:37:34Z","git_url":"git://github.com/jscs-dev/node-jscs.git","ssh_url":"git@github.com:jscs-dev/node-jscs.git","clone_url":"https://github.com/jscs-dev/node-jscs.git","svn_url":"https://github.com/jscs-dev/node-jscs","homepage":"http://jscs.info/","size":14075,"stargazers_count":3389,"watchers_count":3389,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":328,"mirror_url":null,"open_issues_count":188,"forks":328,"open_issues":188,"watchers":3389,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jscs-dev/node-jscs/pulls/1433"},"html":{"href":"https://github.com/jscs-dev/node-jscs/pull/1433"},"issue":{"href":"https://api.github.com/repos/jscs-dev/node-jscs/issues/1433"},"comments":{"href":"https://api.github.com/repos/jscs-dev/node-jscs/issues/1433/comments"},"review_comments":{"href":"https://api.github.com/repos/jscs-dev/node-jscs/pulls/1433/comments"},"review_comment":{"href":"https://api.github.com/repos/jscs-dev/node-jscs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jscs-dev/node-jscs/pulls/1433/commits"},"statuses":{"href":"https://api.github.com/repos/jscs-dev/node-jscs/statuses/184bbc6ec9bce59c09644fc55d97633f4842c3e8"}}}}