{"action":"created","comment":{"url":"https://api.github.com/repos/mochajs/mocha/pulls/comments/244480293","pull_request_review_id":188406789,"id":244480293,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0NDQ4MDI5Mw==","diff_hunk":"@@ -22,6 +22,7 @@ overrides:\n       - karma.conf.js\n       - .wallaby.js\n       - bin/*\n+      - lib/*","path":".eslintrc.yml","position":4,"original_position":4,"commit_id":"716e75fa017d6d30bd173814920a382289533830","original_commit_id":"716e75fa017d6d30bd173814920a382289533830","user":{"login":"craigtaub","id":3532787,"node_id":"MDQ6VXNlcjM1MzI3ODc=","avatar_url":"https://avatars1.githubusercontent.com/u/3532787?v=4","gravatar_id":"","url":"https://api.github.com/users/craigtaub","html_url":"https://github.com/craigtaub","followers_url":"https://api.github.com/users/craigtaub/followers","following_url":"https://api.github.com/users/craigtaub/following{/other_user}","gists_url":"https://api.github.com/users/craigtaub/gists{/gist_id}","starred_url":"https://api.github.com/users/craigtaub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/craigtaub/subscriptions","organizations_url":"https://api.github.com/users/craigtaub/orgs","repos_url":"https://api.github.com/users/craigtaub/repos","events_url":"https://api.github.com/users/craigtaub/events{/privacy}","received_events_url":"https://api.github.com/users/craigtaub/received_events","type":"User","site_admin":false},"body":"Well all the js at top level of `lib` (i.e. not browser/interfaces/reporters/cli). This was due to lint error using template literals. \r\nDo you think its safer just to add the 3 files using it here?","created_at":"2018-12-29T11:21:08Z","updated_at":"2018-12-29T11:21:09Z","html_url":"https://github.com/mochajs/mocha/pull/3467#discussion_r244480293","pull_request_url":"https://api.github.com/repos/mochajs/mocha/pulls/3467","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/mochajs/mocha/pulls/comments/244480293"},"html":{"href":"https://github.com/mochajs/mocha/pull/3467#discussion_r244480293"},"pull_request":{"href":"https://api.github.com/repos/mochajs/mocha/pulls/3467"}},"in_reply_to_id":244391939},"pull_request":{"url":"https://api.github.com/repos/mochajs/mocha/pulls/3467","id":210183244,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEwMTgzMjQ0","html_url":"https://github.com/mochajs/mocha/pull/3467","diff_url":"https://github.com/mochajs/mocha/pull/3467.diff","patch_url":"https://github.com/mochajs/mocha/pull/3467.patch","issue_url":"https://api.github.com/repos/mochajs/mocha/issues/3467","number":3467,"state":"open","locked":false,"title":"Added custom error objects including code","user":{"login":"craigtaub","id":3532787,"node_id":"MDQ6VXNlcjM1MzI3ODc=","avatar_url":"https://avatars1.githubusercontent.com/u/3532787?v=4","gravatar_id":"","url":"https://api.github.com/users/craigtaub","html_url":"https://github.com/craigtaub","followers_url":"https://api.github.com/users/craigtaub/followers","following_url":"https://api.github.com/users/craigtaub/following{/other_user}","gists_url":"https://api.github.com/users/craigtaub/gists{/gist_id}","starred_url":"https://api.github.com/users/craigtaub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/craigtaub/subscriptions","organizations_url":"https://api.github.com/users/craigtaub/orgs","repos_url":"https://api.github.com/users/craigtaub/repos","events_url":"https://api.github.com/users/craigtaub/events{/privacy}","received_events_url":"https://api.github.com/users/craigtaub/received_events","type":"User","site_admin":false},"body":"### Description of the Change\r\n\r\n- introduced error factories which append a `code` property\r\n- the output/stack of an error printed in the browser/terminal should be near identical.\r\n- added details of them to Documentation\r\n- did not add the new error objects to test failures, tests themselves and configs.\r\n\r\n### Alternative design\r\n\r\n- could use a single custom error object and pass code `new MochaError('arg missing message', 'CODE')`.\r\n- could use \"custom errors classes\" - nightmare getting ES5 call stacks to work on different browsers\r\n\r\n### Benefits of custom error objects\r\n\r\n- Keep errors concise (still 1 liners) + allows us to maintain terse error flow (i.e. less noise)\r\n- Errors less brittle (get `code` out the box)\r\n- using codes is a mandated best practice (following NodeJS i.e. https://nodejs.org/dist/latest-v10.x/docs/api/errors.html#errors_node_js_error_codes)\r\n- names easier to infer about which to use\r\n\r\n### Applicable issues\r\n\r\nFixes #3125\r\n(semver-minor)\r\n","created_at":"2018-08-22T15:56:23Z","updated_at":"2018-12-29T11:21:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"510025154d47c10b261928db4686f4ad2887371c","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":185748,"node_id":"MDU6TGFiZWwxODU3NDg=","url":"https://api.github.com/repos/mochajs/mocha/labels/feature","name":"feature","color":"CC9264","default":false},{"id":533082025,"node_id":"MDU6TGFiZWw1MzMwODIwMjU=","url":"https://api.github.com/repos/mochajs/mocha/labels/semver-minor","name":"semver-minor","color":"fbca04","default":false},{"id":478415905,"node_id":"MDU6TGFiZWw0Nzg0MTU5MDU=","url":"https://api.github.com/repos/mochajs/mocha/labels/usability","name":"usability","color":"978578","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/mochajs/mocha/pulls/3467/commits","review_comments_url":"https://api.github.com/repos/mochajs/mocha/pulls/3467/comments","review_comment_url":"https://api.github.com/repos/mochajs/mocha/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mochajs/mocha/issues/3467/comments","statuses_url":"https://api.github.com/repos/mochajs/mocha/statuses/716e75fa017d6d30bd173814920a382289533830","head":{"label":"craigtaub:customError","ref":"customError","sha":"716e75fa017d6d30bd173814920a382289533830","user":{"login":"craigtaub","id":3532787,"node_id":"MDQ6VXNlcjM1MzI3ODc=","avatar_url":"https://avatars1.githubusercontent.com/u/3532787?v=4","gravatar_id":"","url":"https://api.github.com/users/craigtaub","html_url":"https://github.com/craigtaub","followers_url":"https://api.github.com/users/craigtaub/followers","following_url":"https://api.github.com/users/craigtaub/following{/other_user}","gists_url":"https://api.github.com/users/craigtaub/gists{/gist_id}","starred_url":"https://api.github.com/users/craigtaub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/craigtaub/subscriptions","organizations_url":"https://api.github.com/users/craigtaub/orgs","repos_url":"https://api.github.com/users/craigtaub/repos","events_url":"https://api.github.com/users/craigtaub/events{/privacy}","received_events_url":"https://api.github.com/users/craigtaub/received_events","type":"User","site_admin":false},"repo":{"id":80218782,"node_id":"MDEwOlJlcG9zaXRvcnk4MDIxODc4Mg==","name":"mocha","full_name":"craigtaub/mocha","private":false,"owner":{"login":"craigtaub","id":3532787,"node_id":"MDQ6VXNlcjM1MzI3ODc=","avatar_url":"https://avatars1.githubusercontent.com/u/3532787?v=4","gravatar_id":"","url":"https://api.github.com/users/craigtaub","html_url":"https://github.com/craigtaub","followers_url":"https://api.github.com/users/craigtaub/followers","following_url":"https://api.github.com/users/craigtaub/following{/other_user}","gists_url":"https://api.github.com/users/craigtaub/gists{/gist_id}","starred_url":"https://api.github.com/users/craigtaub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/craigtaub/subscriptions","organizations_url":"https://api.github.com/users/craigtaub/orgs","repos_url":"https://api.github.com/users/craigtaub/repos","events_url":"https://api.github.com/users/craigtaub/events{/privacy}","received_events_url":"https://api.github.com/users/craigtaub/received_events","type":"User","site_admin":false},"html_url":"https://github.com/craigtaub/mocha","description":"simple, flexible, fun javascript test framework for node.js & the browser","fork":true,"url":"https://api.github.com/repos/craigtaub/mocha","forks_url":"https://api.github.com/repos/craigtaub/mocha/forks","keys_url":"https://api.github.com/repos/craigtaub/mocha/keys{/key_id}","collaborators_url":"https://api.github.com/repos/craigtaub/mocha/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/craigtaub/mocha/teams","hooks_url":"https://api.github.com/repos/craigtaub/mocha/hooks","issue_events_url":"https://api.github.com/repos/craigtaub/mocha/issues/events{/number}","events_url":"https://api.github.com/repos/craigtaub/mocha/events","assignees_url":"https://api.github.com/repos/craigtaub/mocha/assignees{/user}","branches_url":"https://api.github.com/repos/craigtaub/mocha/branches{/branch}","tags_url":"https://api.github.com/repos/craigtaub/mocha/tags","blobs_url":"https://api.github.com/repos/craigtaub/mocha/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/craigtaub/mocha/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/craigtaub/mocha/git/refs{/sha}","trees_url":"https://api.github.com/repos/craigtaub/mocha/git/trees{/sha}","statuses_url":"https://api.github.com/repos/craigtaub/mocha/statuses/{sha}","languages_url":"https://api.github.com/repos/craigtaub/mocha/languages","stargazers_url":"https://api.github.com/repos/craigtaub/mocha/stargazers","contributors_url":"https://api.github.com/repos/craigtaub/mocha/contributors","subscribers_url":"https://api.github.com/repos/craigtaub/mocha/subscribers","subscription_url":"https://api.github.com/repos/craigtaub/mocha/subscription","commits_url":"https://api.github.com/repos/craigtaub/mocha/commits{/sha}","git_commits_url":"https://api.github.com/repos/craigtaub/mocha/git/commits{/sha}","comments_url":"https://api.github.com/repos/craigtaub/mocha/comments{/number}","issue_comment_url":"https://api.github.com/repos/craigtaub/mocha/issues/comments{/number}","contents_url":"https://api.github.com/repos/craigtaub/mocha/contents/{+path}","compare_url":"https://api.github.com/repos/craigtaub/mocha/compare/{base}...{head}","merges_url":"https://api.github.com/repos/craigtaub/mocha/merges","archive_url":"https://api.github.com/repos/craigtaub/mocha/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/craigtaub/mocha/downloads","issues_url":"https://api.github.com/repos/craigtaub/mocha/issues{/number}","pulls_url":"https://api.github.com/repos/craigtaub/mocha/pulls{/number}","milestones_url":"https://api.github.com/repos/craigtaub/mocha/milestones{/number}","notifications_url":"https://api.github.com/repos/craigtaub/mocha/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/craigtaub/mocha/labels{/name}","releases_url":"https://api.github.com/repos/craigtaub/mocha/releases{/id}","deployments_url":"https://api.github.com/repos/craigtaub/mocha/deployments","created_at":"2017-01-27T15:25:58Z","updated_at":"2018-12-11T12:36:40Z","pushed_at":"2018-12-24T19:31:18Z","git_url":"git://github.com/craigtaub/mocha.git","ssh_url":"git@github.com:craigtaub/mocha.git","clone_url":"https://github.com/craigtaub/mocha.git","svn_url":"https://github.com/craigtaub/mocha","homepage":"https://mochajs.org","size":9686,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mochajs:master","ref":"master","sha":"a9f3526f3b29877b8769bcbe31ec2cc6af48f8f3","user":{"login":"mochajs","id":8770005,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg3NzAwMDU=","avatar_url":"https://avatars2.githubusercontent.com/u/8770005?v=4","gravatar_id":"","url":"https://api.github.com/users/mochajs","html_url":"https://github.com/mochajs","followers_url":"https://api.github.com/users/mochajs/followers","following_url":"https://api.github.com/users/mochajs/following{/other_user}","gists_url":"https://api.github.com/users/mochajs/gists{/gist_id}","starred_url":"https://api.github.com/users/mochajs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mochajs/subscriptions","organizations_url":"https://api.github.com/users/mochajs/orgs","repos_url":"https://api.github.com/users/mochajs/repos","events_url":"https://api.github.com/users/mochajs/events{/privacy}","received_events_url":"https://api.github.com/users/mochajs/received_events","type":"Organization","site_admin":false},"repo":{"id":1451352,"node_id":"MDEwOlJlcG9zaXRvcnkxNDUxMzUy","name":"mocha","full_name":"mochajs/mocha","private":false,"owner":{"login":"mochajs","id":8770005,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg3NzAwMDU=","avatar_url":"https://avatars2.githubusercontent.com/u/8770005?v=4","gravatar_id":"","url":"https://api.github.com/users/mochajs","html_url":"https://github.com/mochajs","followers_url":"https://api.github.com/users/mochajs/followers","following_url":"https://api.github.com/users/mochajs/following{/other_user}","gists_url":"https://api.github.com/users/mochajs/gists{/gist_id}","starred_url":"https://api.github.com/users/mochajs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mochajs/subscriptions","organizations_url":"https://api.github.com/users/mochajs/orgs","repos_url":"https://api.github.com/users/mochajs/repos","events_url":"https://api.github.com/users/mochajs/events{/privacy}","received_events_url":"https://api.github.com/users/mochajs/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/mochajs/mocha","description":"☕️ simple, flexible, fun javascript test framework for node.js & the browser","fork":false,"url":"https://api.github.com/repos/mochajs/mocha","forks_url":"https://api.github.com/repos/mochajs/mocha/forks","keys_url":"https://api.github.com/repos/mochajs/mocha/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mochajs/mocha/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mochajs/mocha/teams","hooks_url":"https://api.github.com/repos/mochajs/mocha/hooks","issue_events_url":"https://api.github.com/repos/mochajs/mocha/issues/events{/number}","events_url":"https://api.github.com/repos/mochajs/mocha/events","assignees_url":"https://api.github.com/repos/mochajs/mocha/assignees{/user}","branches_url":"https://api.github.com/repos/mochajs/mocha/branches{/branch}","tags_url":"https://api.github.com/repos/mochajs/mocha/tags","blobs_url":"https://api.github.com/repos/mochajs/mocha/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mochajs/mocha/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mochajs/mocha/git/refs{/sha}","trees_url":"https://api.github.com/repos/mochajs/mocha/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mochajs/mocha/statuses/{sha}","languages_url":"https://api.github.com/repos/mochajs/mocha/languages","stargazers_url":"https://api.github.com/repos/mochajs/mocha/stargazers","contributors_url":"https://api.github.com/repos/mochajs/mocha/contributors","subscribers_url":"https://api.github.com/repos/mochajs/mocha/subscribers","subscription_url":"https://api.github.com/repos/mochajs/mocha/subscription","commits_url":"https://api.github.com/repos/mochajs/mocha/commits{/sha}","git_commits_url":"https://api.github.com/repos/mochajs/mocha/git/commits{/sha}","comments_url":"https://api.github.com/repos/mochajs/mocha/comments{/number}","issue_comment_url":"https://api.github.com/repos/mochajs/mocha/issues/comments{/number}","contents_url":"https://api.github.com/repos/mochajs/mocha/contents/{+path}","compare_url":"https://api.github.com/repos/mochajs/mocha/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mochajs/mocha/merges","archive_url":"https://api.github.com/repos/mochajs/mocha/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mochajs/mocha/downloads","issues_url":"https://api.github.com/repos/mochajs/mocha/issues{/number}","pulls_url":"https://api.github.com/repos/mochajs/mocha/pulls{/number}","milestones_url":"https://api.github.com/repos/mochajs/mocha/milestones{/number}","notifications_url":"https://api.github.com/repos/mochajs/mocha/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mochajs/mocha/labels{/name}","releases_url":"https://api.github.com/repos/mochajs/mocha/releases{/id}","deployments_url":"https://api.github.com/repos/mochajs/mocha/deployments","created_at":"2011-03-07T18:44:25Z","updated_at":"2018-12-29T02:24:45Z","pushed_at":"2018-12-28T23:40:37Z","git_url":"git://github.com/mochajs/mocha.git","ssh_url":"git@github.com:mochajs/mocha.git","clone_url":"https://github.com/mochajs/mocha.git","svn_url":"https://github.com/mochajs/mocha","homepage":"https://mochajs.org","size":10420,"stargazers_count":16875,"watchers_count":16875,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2307,"mirror_url":null,"archived":false,"open_issues_count":275,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":2307,"open_issues":275,"watchers":16875,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mochajs/mocha/pulls/3467"},"html":{"href":"https://github.com/mochajs/mocha/pull/3467"},"issue":{"href":"https://api.github.com/repos/mochajs/mocha/issues/3467"},"comments":{"href":"https://api.github.com/repos/mochajs/mocha/issues/3467/comments"},"review_comments":{"href":"https://api.github.com/repos/mochajs/mocha/pulls/3467/comments"},"review_comment":{"href":"https://api.github.com/repos/mochajs/mocha/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mochajs/mocha/pulls/3467/commits"},"statuses":{"href":"https://api.github.com/repos/mochajs/mocha/statuses/716e75fa017d6d30bd173814920a382289533830"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"craigtaub"}}