{"action":"created","comment":{"url":"https://api.github.com/repos/sindresorhus/awesome-lint/pulls/comments/73506293","id":73506293,"diff_hunk":"@@ -0,0 +1,15 @@\n+'use strict';\n+const visit = require('unist-util-visit');\n+const chalk = require('chalk');\n+\n+module.exports = (ast, file, language, done) => {\n+\tvisit(ast, 'heading', (node, index) => {\n+\t\tconst title = node.children[0].value;\n+\n+\t\tif (index === 1 && title !== 'Contents') {","path":"rules/table-of-contents.js","position":9,"original_position":9,"commit_id":"828a74edc0d02a3f0f4d02c62eb8d914e8af74ec","original_commit_id":"828a74edc0d02a3f0f4d02c62eb8d914e8af74ec","user":{"login":"sindresorhus","id":170270,"avatar_url":"https://avatars.githubusercontent.com/u/170270?v=3","gravatar_id":"","url":"https://api.github.com/users/sindresorhus","html_url":"https://github.com/sindresorhus","followers_url":"https://api.github.com/users/sindresorhus/followers","following_url":"https://api.github.com/users/sindresorhus/following{/other_user}","gists_url":"https://api.github.com/users/sindresorhus/gists{/gist_id}","starred_url":"https://api.github.com/users/sindresorhus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sindresorhus/subscriptions","organizations_url":"https://api.github.com/users/sindresorhus/orgs","repos_url":"https://api.github.com/users/sindresorhus/repos","events_url":"https://api.github.com/users/sindresorhus/events{/privacy}","received_events_url":"https://api.github.com/users/sindresorhus/received_events","type":"User","site_admin":false},"body":"> should we allow things like <h2> Contents and ## **Contents**?\r\n\r\nNo","created_at":"2016-08-04T11:37:27Z","updated_at":"2016-08-04T11:37:27Z","html_url":"https://github.com/sindresorhus/awesome-lint/pull/11#discussion_r73506293","pull_request_url":"https://api.github.com/repos/sindresorhus/awesome-lint/pulls/11","_links":{"self":{"href":"https://api.github.com/repos/sindresorhus/awesome-lint/pulls/comments/73506293"},"html":{"href":"https://github.com/sindresorhus/awesome-lint/pull/11#discussion_r73506293"},"pull_request":{"href":"https://api.github.com/repos/sindresorhus/awesome-lint/pulls/11"}}},"pull_request":{"url":"https://api.github.com/repos/sindresorhus/awesome-lint/pulls/11","id":80023762,"html_url":"https://github.com/sindresorhus/awesome-lint/pull/11","diff_url":"https://github.com/sindresorhus/awesome-lint/pull/11.diff","patch_url":"https://github.com/sindresorhus/awesome-lint/pull/11.patch","issue_url":"https://api.github.com/repos/sindresorhus/awesome-lint/issues/11","number":11,"state":"open","locked":false,"title":"[WIP] Add rule for table of contents","user":{"login":"matheuss","id":4721750,"avatar_url":"https://avatars.githubusercontent.com/u/4721750?v=3","gravatar_id":"","url":"https://api.github.com/users/matheuss","html_url":"https://github.com/matheuss","followers_url":"https://api.github.com/users/matheuss/followers","following_url":"https://api.github.com/users/matheuss/following{/other_user}","gists_url":"https://api.github.com/users/matheuss/gists{/gist_id}","starred_url":"https://api.github.com/users/matheuss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matheuss/subscriptions","organizations_url":"https://api.github.com/users/matheuss/orgs","repos_url":"https://api.github.com/users/matheuss/repos","events_url":"https://api.github.com/users/matheuss/events{/privacy}","received_events_url":"https://api.github.com/users/matheuss/received_events","type":"User","site_admin":false},"body":"When done, closes #4.\r\n\r\n- [x] The first section must be `Contents`\r\n- [ ] All links must point to existing sections with the **same** name\r\n- [ ] All sections must be included in the `Contents` (minus the `License)\r\n- [ ] The list must have no more than two levels\r\n- [ ] The sections must follow the order of the table","created_at":"2016-08-04T06:17:51Z","updated_at":"2016-08-04T11:37:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c2fd43bcc57447112ee8edd7887bfd6301cdf20a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/sindresorhus/awesome-lint/pulls/11/commits","review_comments_url":"https://api.github.com/repos/sindresorhus/awesome-lint/pulls/11/comments","review_comment_url":"https://api.github.com/repos/sindresorhus/awesome-lint/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sindresorhus/awesome-lint/issues/11/comments","statuses_url":"https://api.github.com/repos/sindresorhus/awesome-lint/statuses/828a74edc0d02a3f0f4d02c62eb8d914e8af74ec","head":{"label":"matheuss:rule/table-of-contents","ref":"rule/table-of-contents","sha":"828a74edc0d02a3f0f4d02c62eb8d914e8af74ec","user":{"login":"matheuss","id":4721750,"avatar_url":"https://avatars.githubusercontent.com/u/4721750?v=3","gravatar_id":"","url":"https://api.github.com/users/matheuss","html_url":"https://github.com/matheuss","followers_url":"https://api.github.com/users/matheuss/followers","following_url":"https://api.github.com/users/matheuss/following{/other_user}","gists_url":"https://api.github.com/users/matheuss/gists{/gist_id}","starred_url":"https://api.github.com/users/matheuss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matheuss/subscriptions","organizations_url":"https://api.github.com/users/matheuss/orgs","repos_url":"https://api.github.com/users/matheuss/repos","events_url":"https://api.github.com/users/matheuss/events{/privacy}","received_events_url":"https://api.github.com/users/matheuss/received_events","type":"User","site_admin":false},"repo":{"id":64698645,"name":"awesome-lint","full_name":"matheuss/awesome-lint","owner":{"login":"matheuss","id":4721750,"avatar_url":"https://avatars.githubusercontent.com/u/4721750?v=3","gravatar_id":"","url":"https://api.github.com/users/matheuss","html_url":"https://github.com/matheuss","followers_url":"https://api.github.com/users/matheuss/followers","following_url":"https://api.github.com/users/matheuss/following{/other_user}","gists_url":"https://api.github.com/users/matheuss/gists{/gist_id}","starred_url":"https://api.github.com/users/matheuss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matheuss/subscriptions","organizations_url":"https://api.github.com/users/matheuss/orgs","repos_url":"https://api.github.com/users/matheuss/repos","events_url":"https://api.github.com/users/matheuss/events{/privacy}","received_events_url":"https://api.github.com/users/matheuss/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/matheuss/awesome-lint","description":"Linter for Awesome lists","fork":true,"url":"https://api.github.com/repos/matheuss/awesome-lint","forks_url":"https://api.github.com/repos/matheuss/awesome-lint/forks","keys_url":"https://api.github.com/repos/matheuss/awesome-lint/keys{/key_id}","collaborators_url":"https://api.github.com/repos/matheuss/awesome-lint/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/matheuss/awesome-lint/teams","hooks_url":"https://api.github.com/repos/matheuss/awesome-lint/hooks","issue_events_url":"https://api.github.com/repos/matheuss/awesome-lint/issues/events{/number}","events_url":"https://api.github.com/repos/matheuss/awesome-lint/events","assignees_url":"https://api.github.com/repos/matheuss/awesome-lint/assignees{/user}","branches_url":"https://api.github.com/repos/matheuss/awesome-lint/branches{/branch}","tags_url":"https://api.github.com/repos/matheuss/awesome-lint/tags","blobs_url":"https://api.github.com/repos/matheuss/awesome-lint/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/matheuss/awesome-lint/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/matheuss/awesome-lint/git/refs{/sha}","trees_url":"https://api.github.com/repos/matheuss/awesome-lint/git/trees{/sha}","statuses_url":"https://api.github.com/repos/matheuss/awesome-lint/statuses/{sha}","languages_url":"https://api.github.com/repos/matheuss/awesome-lint/languages","stargazers_url":"https://api.github.com/repos/matheuss/awesome-lint/stargazers","contributors_url":"https://api.github.com/repos/matheuss/awesome-lint/contributors","subscribers_url":"https://api.github.com/repos/matheuss/awesome-lint/subscribers","subscription_url":"https://api.github.com/repos/matheuss/awesome-lint/subscription","commits_url":"https://api.github.com/repos/matheuss/awesome-lint/commits{/sha}","git_commits_url":"https://api.github.com/repos/matheuss/awesome-lint/git/commits{/sha}","comments_url":"https://api.github.com/repos/matheuss/awesome-lint/comments{/number}","issue_comment_url":"https://api.github.com/repos/matheuss/awesome-lint/issues/comments{/number}","contents_url":"https://api.github.com/repos/matheuss/awesome-lint/contents/{+path}","compare_url":"https://api.github.com/repos/matheuss/awesome-lint/compare/{base}...{head}","merges_url":"https://api.github.com/repos/matheuss/awesome-lint/merges","archive_url":"https://api.github.com/repos/matheuss/awesome-lint/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/matheuss/awesome-lint/downloads","issues_url":"https://api.github.com/repos/matheuss/awesome-lint/issues{/number}","pulls_url":"https://api.github.com/repos/matheuss/awesome-lint/pulls{/number}","milestones_url":"https://api.github.com/repos/matheuss/awesome-lint/milestones{/number}","notifications_url":"https://api.github.com/repos/matheuss/awesome-lint/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/matheuss/awesome-lint/labels{/name}","releases_url":"https://api.github.com/repos/matheuss/awesome-lint/releases{/id}","deployments_url":"https://api.github.com/repos/matheuss/awesome-lint/deployments","created_at":"2016-08-01T20:17:57Z","updated_at":"2016-08-01T20:17:58Z","pushed_at":"2016-08-04T06:10:31Z","git_url":"git://github.com/matheuss/awesome-lint.git","ssh_url":"git@github.com:matheuss/awesome-lint.git","clone_url":"https://github.com/matheuss/awesome-lint.git","svn_url":"https://github.com/matheuss/awesome-lint","homepage":null,"size":76,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"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":"sindresorhus:master","ref":"master","sha":"18a1de32d8c0cfc17ac9a203ce2f6bf83832c73a","user":{"login":"sindresorhus","id":170270,"avatar_url":"https://avatars.githubusercontent.com/u/170270?v=3","gravatar_id":"","url":"https://api.github.com/users/sindresorhus","html_url":"https://github.com/sindresorhus","followers_url":"https://api.github.com/users/sindresorhus/followers","following_url":"https://api.github.com/users/sindresorhus/following{/other_user}","gists_url":"https://api.github.com/users/sindresorhus/gists{/gist_id}","starred_url":"https://api.github.com/users/sindresorhus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sindresorhus/subscriptions","organizations_url":"https://api.github.com/users/sindresorhus/orgs","repos_url":"https://api.github.com/users/sindresorhus/repos","events_url":"https://api.github.com/users/sindresorhus/events{/privacy}","received_events_url":"https://api.github.com/users/sindresorhus/received_events","type":"User","site_admin":false},"repo":{"id":64659785,"name":"awesome-lint","full_name":"sindresorhus/awesome-lint","owner":{"login":"sindresorhus","id":170270,"avatar_url":"https://avatars.githubusercontent.com/u/170270?v=3","gravatar_id":"","url":"https://api.github.com/users/sindresorhus","html_url":"https://github.com/sindresorhus","followers_url":"https://api.github.com/users/sindresorhus/followers","following_url":"https://api.github.com/users/sindresorhus/following{/other_user}","gists_url":"https://api.github.com/users/sindresorhus/gists{/gist_id}","starred_url":"https://api.github.com/users/sindresorhus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sindresorhus/subscriptions","organizations_url":"https://api.github.com/users/sindresorhus/orgs","repos_url":"https://api.github.com/users/sindresorhus/repos","events_url":"https://api.github.com/users/sindresorhus/events{/privacy}","received_events_url":"https://api.github.com/users/sindresorhus/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sindresorhus/awesome-lint","description":"Linter for Awesome lists","fork":false,"url":"https://api.github.com/repos/sindresorhus/awesome-lint","forks_url":"https://api.github.com/repos/sindresorhus/awesome-lint/forks","keys_url":"https://api.github.com/repos/sindresorhus/awesome-lint/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sindresorhus/awesome-lint/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sindresorhus/awesome-lint/teams","hooks_url":"https://api.github.com/repos/sindresorhus/awesome-lint/hooks","issue_events_url":"https://api.github.com/repos/sindresorhus/awesome-lint/issues/events{/number}","events_url":"https://api.github.com/repos/sindresorhus/awesome-lint/events","assignees_url":"https://api.github.com/repos/sindresorhus/awesome-lint/assignees{/user}","branches_url":"https://api.github.com/repos/sindresorhus/awesome-lint/branches{/branch}","tags_url":"https://api.github.com/repos/sindresorhus/awesome-lint/tags","blobs_url":"https://api.github.com/repos/sindresorhus/awesome-lint/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sindresorhus/awesome-lint/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sindresorhus/awesome-lint/git/refs{/sha}","trees_url":"https://api.github.com/repos/sindresorhus/awesome-lint/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sindresorhus/awesome-lint/statuses/{sha}","languages_url":"https://api.github.com/repos/sindresorhus/awesome-lint/languages","stargazers_url":"https://api.github.com/repos/sindresorhus/awesome-lint/stargazers","contributors_url":"https://api.github.com/repos/sindresorhus/awesome-lint/contributors","subscribers_url":"https://api.github.com/repos/sindresorhus/awesome-lint/subscribers","subscription_url":"https://api.github.com/repos/sindresorhus/awesome-lint/subscription","commits_url":"https://api.github.com/repos/sindresorhus/awesome-lint/commits{/sha}","git_commits_url":"https://api.github.com/repos/sindresorhus/awesome-lint/git/commits{/sha}","comments_url":"https://api.github.com/repos/sindresorhus/awesome-lint/comments{/number}","issue_comment_url":"https://api.github.com/repos/sindresorhus/awesome-lint/issues/comments{/number}","contents_url":"https://api.github.com/repos/sindresorhus/awesome-lint/contents/{+path}","compare_url":"https://api.github.com/repos/sindresorhus/awesome-lint/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sindresorhus/awesome-lint/merges","archive_url":"https://api.github.com/repos/sindresorhus/awesome-lint/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sindresorhus/awesome-lint/downloads","issues_url":"https://api.github.com/repos/sindresorhus/awesome-lint/issues{/number}","pulls_url":"https://api.github.com/repos/sindresorhus/awesome-lint/pulls{/number}","milestones_url":"https://api.github.com/repos/sindresorhus/awesome-lint/milestones{/number}","notifications_url":"https://api.github.com/repos/sindresorhus/awesome-lint/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sindresorhus/awesome-lint/labels{/name}","releases_url":"https://api.github.com/repos/sindresorhus/awesome-lint/releases{/id}","deployments_url":"https://api.github.com/repos/sindresorhus/awesome-lint/deployments","created_at":"2016-08-01T10:55:57Z","updated_at":"2016-08-04T07:35:58Z","pushed_at":"2016-08-04T06:17:51Z","git_url":"git://github.com/sindresorhus/awesome-lint.git","ssh_url":"git@github.com:sindresorhus/awesome-lint.git","clone_url":"https://github.com/sindresorhus/awesome-lint.git","svn_url":"https://github.com/sindresorhus/awesome-lint","homepage":null,"size":62,"stargazers_count":69,"watchers_count":69,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":9,"forks":2,"open_issues":9,"watchers":69,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sindresorhus/awesome-lint/pulls/11"},"html":{"href":"https://github.com/sindresorhus/awesome-lint/pull/11"},"issue":{"href":"https://api.github.com/repos/sindresorhus/awesome-lint/issues/11"},"comments":{"href":"https://api.github.com/repos/sindresorhus/awesome-lint/issues/11/comments"},"review_comments":{"href":"https://api.github.com/repos/sindresorhus/awesome-lint/pulls/11/comments"},"review_comment":{"href":"https://api.github.com/repos/sindresorhus/awesome-lint/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sindresorhus/awesome-lint/pulls/11/commits"},"statuses":{"href":"https://api.github.com/repos/sindresorhus/awesome-lint/statuses/828a74edc0d02a3f0f4d02c62eb8d914e8af74ec"}}}}
{"actor":{"display_login":"sindresorhus"}}