{"action":"created","comment":{"url":"https://api.github.com/repos/eslint/eslint/pulls/comments/141767650","pull_request_review_id":66034630,"id":141767650,"diff_hunk":"@@ -241,6 +241,26 @@ Map {\n */\n ```\n \n+### Linter#defineParser\n+\n+Each instance of `Linter` holds a map of custom parsers. If you want to define a parser programmatically you can add this function\n+with the name of the parser as first argument and the parser object (having either `parseForESLint` or `parse` as keys) as second argument.\n+\n+If during linting the parser is not found it will fallback to `require(parserId)`.","path":"docs/developer-guide/nodejs-api.md","position":9,"original_position":9,"commit_id":"17d09ae06737b6a900a2e1b275cb81867dae6a1c","original_commit_id":"17d09ae06737b6a900a2e1b275cb81867dae6a1c","user":{"login":"not-an-aardvark","id":11638619,"avatar_url":"https://avatars2.githubusercontent.com/u/11638619?v=4","gravatar_id":"","url":"https://api.github.com/users/not-an-aardvark","html_url":"https://github.com/not-an-aardvark","followers_url":"https://api.github.com/users/not-an-aardvark/followers","following_url":"https://api.github.com/users/not-an-aardvark/following{/other_user}","gists_url":"https://api.github.com/users/not-an-aardvark/gists{/gist_id}","starred_url":"https://api.github.com/users/not-an-aardvark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/not-an-aardvark/subscriptions","organizations_url":"https://api.github.com/users/not-an-aardvark/orgs","repos_url":"https://api.github.com/users/not-an-aardvark/repos","events_url":"https://api.github.com/users/not-an-aardvark/events{/privacy}","received_events_url":"https://api.github.com/users/not-an-aardvark/received_events","type":"User","site_admin":false},"body":"Nitpick: I think a comma should be added after the word \"found\".","created_at":"2017-09-29T00:35:46Z","updated_at":"2017-09-29T00:36:03Z","html_url":"https://github.com/eslint/eslint/pull/9321#discussion_r141767650","pull_request_url":"https://api.github.com/repos/eslint/eslint/pulls/9321","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/eslint/eslint/pulls/comments/141767650"},"html":{"href":"https://github.com/eslint/eslint/pull/9321#discussion_r141767650"},"pull_request":{"href":"https://api.github.com/repos/eslint/eslint/pulls/9321"}}},"pull_request":{"url":"https://api.github.com/repos/eslint/eslint/pulls/9321","id":141491058,"html_url":"https://github.com/eslint/eslint/pull/9321","diff_url":"https://github.com/eslint/eslint/pull/9321.diff","patch_url":"https://github.com/eslint/eslint/pull/9321.patch","issue_url":"https://api.github.com/repos/eslint/eslint/issues/9321","number":9321,"state":"open","locked":false,"title":"New: add a defineParser function","user":{"login":"CompuIves","id":587016,"avatar_url":"https://avatars3.githubusercontent.com/u/587016?v=4","gravatar_id":"","url":"https://api.github.com/users/CompuIves","html_url":"https://github.com/CompuIves","followers_url":"https://api.github.com/users/CompuIves/followers","following_url":"https://api.github.com/users/CompuIves/following{/other_user}","gists_url":"https://api.github.com/users/CompuIves/gists{/gist_id}","starred_url":"https://api.github.com/users/CompuIves/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CompuIves/subscriptions","organizations_url":"https://api.github.com/users/CompuIves/orgs","repos_url":"https://api.github.com/users/CompuIves/repos","events_url":"https://api.github.com/users/CompuIves/events{/privacy}","received_events_url":"https://api.github.com/users/CompuIves/received_events","type":"User","site_admin":false},"body":"<!--\r\n    ESLint adheres to the [JS Foundation Code of Conduct](https://js.foundation/community/code-of-conduct).\r\n-->\r\n\r\n**What is the purpose of this pull request? (put an \"X\" next to item)**\r\n\r\n[x] Documentation update\r\n[ ] Bug fix ([template](https://raw.githubusercontent.com/eslint/eslint/master/templates/bug-report.md))\r\n[ ] New rule ([template](https://raw.githubusercontent.com/eslint/eslint/master/templates/rule-proposal.md))\r\n[ ] Changes an existing rule ([template](https://raw.githubusercontent.com/eslint/eslint/master/templates/rule-change-proposal.md))\r\n[ ] Add autofixing to a rule\r\n[ ] Add a CLI option\r\n[x] Add something to the core\r\n[ ] Other, please explain:\r\n\r\n<!--\r\n    If the item you've checked above has a template, please paste the template questions below and answer them. (If this pull request is addressing an issue, you can just paste a link to the issue here instead.)\r\n-->\r\n\r\n<!--\r\n    Please ensure your pull request is ready:\r\n\r\n    - Read the pull request guide (http://eslint.org/docs/developer-guide/contributing/pull-requests)\r\n    - Include tests for this change\r\n    - Update documentation for this change (if appropriate)\r\n-->\r\n\r\n<!--\r\n    The following is required for all pull requests:\r\n-->\r\n\r\n**What changes did you make? (Give an overview)**\r\n\r\nI added an `defineParser` function to the Node API, which allows you to define a custom parser that `eslint` will use when defined in the config.\r\n\r\n**Is there anything you'd like reviewers to focus on?**\r\n\r\nI'm not sure if the implementation is desired, returning the error object for errors doesn't feel right. I'm also not sure if I added enough tests.\r\n","created_at":"2017-09-17T15:43:42Z","updated_at":"2017-09-29T00:36:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2be71e5310074465841169d871ed02982ada07e4","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/eslint/eslint/pulls/9321/commits","review_comments_url":"https://api.github.com/repos/eslint/eslint/pulls/9321/comments","review_comment_url":"https://api.github.com/repos/eslint/eslint/pulls/comments{/number}","comments_url":"https://api.github.com/repos/eslint/eslint/issues/9321/comments","statuses_url":"https://api.github.com/repos/eslint/eslint/statuses/17d09ae06737b6a900a2e1b275cb81867dae6a1c","head":{"label":"CompuIves:add/define-parser","ref":"add/define-parser","sha":"17d09ae06737b6a900a2e1b275cb81867dae6a1c","user":{"login":"CompuIves","id":587016,"avatar_url":"https://avatars3.githubusercontent.com/u/587016?v=4","gravatar_id":"","url":"https://api.github.com/users/CompuIves","html_url":"https://github.com/CompuIves","followers_url":"https://api.github.com/users/CompuIves/followers","following_url":"https://api.github.com/users/CompuIves/following{/other_user}","gists_url":"https://api.github.com/users/CompuIves/gists{/gist_id}","starred_url":"https://api.github.com/users/CompuIves/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CompuIves/subscriptions","organizations_url":"https://api.github.com/users/CompuIves/orgs","repos_url":"https://api.github.com/users/CompuIves/repos","events_url":"https://api.github.com/users/CompuIves/events{/privacy}","received_events_url":"https://api.github.com/users/CompuIves/received_events","type":"User","site_admin":false},"repo":{"id":100545375,"name":"eslint","full_name":"CompuIves/eslint","owner":{"login":"CompuIves","id":587016,"avatar_url":"https://avatars3.githubusercontent.com/u/587016?v=4","gravatar_id":"","url":"https://api.github.com/users/CompuIves","html_url":"https://github.com/CompuIves","followers_url":"https://api.github.com/users/CompuIves/followers","following_url":"https://api.github.com/users/CompuIves/following{/other_user}","gists_url":"https://api.github.com/users/CompuIves/gists{/gist_id}","starred_url":"https://api.github.com/users/CompuIves/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CompuIves/subscriptions","organizations_url":"https://api.github.com/users/CompuIves/orgs","repos_url":"https://api.github.com/users/CompuIves/repos","events_url":"https://api.github.com/users/CompuIves/events{/privacy}","received_events_url":"https://api.github.com/users/CompuIves/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/CompuIves/eslint","description":"A fully pluggable tool for identifying and reporting on patterns in JavaScript.","fork":true,"url":"https://api.github.com/repos/CompuIves/eslint","forks_url":"https://api.github.com/repos/CompuIves/eslint/forks","keys_url":"https://api.github.com/repos/CompuIves/eslint/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CompuIves/eslint/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CompuIves/eslint/teams","hooks_url":"https://api.github.com/repos/CompuIves/eslint/hooks","issue_events_url":"https://api.github.com/repos/CompuIves/eslint/issues/events{/number}","events_url":"https://api.github.com/repos/CompuIves/eslint/events","assignees_url":"https://api.github.com/repos/CompuIves/eslint/assignees{/user}","branches_url":"https://api.github.com/repos/CompuIves/eslint/branches{/branch}","tags_url":"https://api.github.com/repos/CompuIves/eslint/tags","blobs_url":"https://api.github.com/repos/CompuIves/eslint/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CompuIves/eslint/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CompuIves/eslint/git/refs{/sha}","trees_url":"https://api.github.com/repos/CompuIves/eslint/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CompuIves/eslint/statuses/{sha}","languages_url":"https://api.github.com/repos/CompuIves/eslint/languages","stargazers_url":"https://api.github.com/repos/CompuIves/eslint/stargazers","contributors_url":"https://api.github.com/repos/CompuIves/eslint/contributors","subscribers_url":"https://api.github.com/repos/CompuIves/eslint/subscribers","subscription_url":"https://api.github.com/repos/CompuIves/eslint/subscription","commits_url":"https://api.github.com/repos/CompuIves/eslint/commits{/sha}","git_commits_url":"https://api.github.com/repos/CompuIves/eslint/git/commits{/sha}","comments_url":"https://api.github.com/repos/CompuIves/eslint/comments{/number}","issue_comment_url":"https://api.github.com/repos/CompuIves/eslint/issues/comments{/number}","contents_url":"https://api.github.com/repos/CompuIves/eslint/contents/{+path}","compare_url":"https://api.github.com/repos/CompuIves/eslint/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CompuIves/eslint/merges","archive_url":"https://api.github.com/repos/CompuIves/eslint/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CompuIves/eslint/downloads","issues_url":"https://api.github.com/repos/CompuIves/eslint/issues{/number}","pulls_url":"https://api.github.com/repos/CompuIves/eslint/pulls{/number}","milestones_url":"https://api.github.com/repos/CompuIves/eslint/milestones{/number}","notifications_url":"https://api.github.com/repos/CompuIves/eslint/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CompuIves/eslint/labels{/name}","releases_url":"https://api.github.com/repos/CompuIves/eslint/releases{/id}","deployments_url":"https://api.github.com/repos/CompuIves/eslint/deployments","created_at":"2017-08-17T00:49:09Z","updated_at":"2017-08-17T00:49:15Z","pushed_at":"2017-09-28T17:51:55Z","git_url":"git://github.com/CompuIves/eslint.git","ssh_url":"git@github.com:CompuIves/eslint.git","clone_url":"https://github.com/CompuIves/eslint.git","svn_url":"https://github.com/CompuIves/eslint","homepage":"http://eslint.org","size":16412,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"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":"eslint:master","ref":"master","sha":"439e8e697f761bebeb3dab085ba85139829397b2","user":{"login":"eslint","id":6019716,"avatar_url":"https://avatars3.githubusercontent.com/u/6019716?v=4","gravatar_id":"","url":"https://api.github.com/users/eslint","html_url":"https://github.com/eslint","followers_url":"https://api.github.com/users/eslint/followers","following_url":"https://api.github.com/users/eslint/following{/other_user}","gists_url":"https://api.github.com/users/eslint/gists{/gist_id}","starred_url":"https://api.github.com/users/eslint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eslint/subscriptions","organizations_url":"https://api.github.com/users/eslint/orgs","repos_url":"https://api.github.com/users/eslint/repos","events_url":"https://api.github.com/users/eslint/events{/privacy}","received_events_url":"https://api.github.com/users/eslint/received_events","type":"Organization","site_admin":false},"repo":{"id":11061773,"name":"eslint","full_name":"eslint/eslint","owner":{"login":"eslint","id":6019716,"avatar_url":"https://avatars3.githubusercontent.com/u/6019716?v=4","gravatar_id":"","url":"https://api.github.com/users/eslint","html_url":"https://github.com/eslint","followers_url":"https://api.github.com/users/eslint/followers","following_url":"https://api.github.com/users/eslint/following{/other_user}","gists_url":"https://api.github.com/users/eslint/gists{/gist_id}","starred_url":"https://api.github.com/users/eslint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eslint/subscriptions","organizations_url":"https://api.github.com/users/eslint/orgs","repos_url":"https://api.github.com/users/eslint/repos","events_url":"https://api.github.com/users/eslint/events{/privacy}","received_events_url":"https://api.github.com/users/eslint/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/eslint/eslint","description":"A fully pluggable tool for identifying and reporting on patterns in JavaScript.","fork":false,"url":"https://api.github.com/repos/eslint/eslint","forks_url":"https://api.github.com/repos/eslint/eslint/forks","keys_url":"https://api.github.com/repos/eslint/eslint/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eslint/eslint/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eslint/eslint/teams","hooks_url":"https://api.github.com/repos/eslint/eslint/hooks","issue_events_url":"https://api.github.com/repos/eslint/eslint/issues/events{/number}","events_url":"https://api.github.com/repos/eslint/eslint/events","assignees_url":"https://api.github.com/repos/eslint/eslint/assignees{/user}","branches_url":"https://api.github.com/repos/eslint/eslint/branches{/branch}","tags_url":"https://api.github.com/repos/eslint/eslint/tags","blobs_url":"https://api.github.com/repos/eslint/eslint/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eslint/eslint/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eslint/eslint/git/refs{/sha}","trees_url":"https://api.github.com/repos/eslint/eslint/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eslint/eslint/statuses/{sha}","languages_url":"https://api.github.com/repos/eslint/eslint/languages","stargazers_url":"https://api.github.com/repos/eslint/eslint/stargazers","contributors_url":"https://api.github.com/repos/eslint/eslint/contributors","subscribers_url":"https://api.github.com/repos/eslint/eslint/subscribers","subscription_url":"https://api.github.com/repos/eslint/eslint/subscription","commits_url":"https://api.github.com/repos/eslint/eslint/commits{/sha}","git_commits_url":"https://api.github.com/repos/eslint/eslint/git/commits{/sha}","comments_url":"https://api.github.com/repos/eslint/eslint/comments{/number}","issue_comment_url":"https://api.github.com/repos/eslint/eslint/issues/comments{/number}","contents_url":"https://api.github.com/repos/eslint/eslint/contents/{+path}","compare_url":"https://api.github.com/repos/eslint/eslint/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eslint/eslint/merges","archive_url":"https://api.github.com/repos/eslint/eslint/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eslint/eslint/downloads","issues_url":"https://api.github.com/repos/eslint/eslint/issues{/number}","pulls_url":"https://api.github.com/repos/eslint/eslint/pulls{/number}","milestones_url":"https://api.github.com/repos/eslint/eslint/milestones{/number}","notifications_url":"https://api.github.com/repos/eslint/eslint/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eslint/eslint/labels{/name}","releases_url":"https://api.github.com/repos/eslint/eslint/releases{/id}","deployments_url":"https://api.github.com/repos/eslint/eslint/deployments","created_at":"2013-06-29T23:59:48Z","updated_at":"2017-09-28T23:00:57Z","pushed_at":"2017-09-28T21:54:19Z","git_url":"git://github.com/eslint/eslint.git","ssh_url":"git@github.com:eslint/eslint.git","clone_url":"https://github.com/eslint/eslint.git","svn_url":"https://github.com/eslint/eslint","homepage":"https://eslint.org","size":16457,"stargazers_count":8686,"watchers_count":8686,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1644,"mirror_url":null,"open_issues_count":232,"forks":1644,"open_issues":232,"watchers":8686,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/eslint/eslint/pulls/9321"},"html":{"href":"https://github.com/eslint/eslint/pull/9321"},"issue":{"href":"https://api.github.com/repos/eslint/eslint/issues/9321"},"comments":{"href":"https://api.github.com/repos/eslint/eslint/issues/9321/comments"},"review_comments":{"href":"https://api.github.com/repos/eslint/eslint/pulls/9321/comments"},"review_comment":{"href":"https://api.github.com/repos/eslint/eslint/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/eslint/eslint/pulls/9321/commits"},"statuses":{"href":"https://api.github.com/repos/eslint/eslint/statuses/17d09ae06737b6a900a2e1b275cb81867dae6a1c"}},"author_association":"NONE"}}
{"actor":{"display_login":"not-an-aardvark"}}