{"action":"created","comment":{"url":"https://api.github.com/repos/yannickcr/eslint-plugin-react/pulls/comments/89862598","pull_request_review_id":10394091,"id":89862598,"diff_hunk":"@@ -0,0 +1,91 @@\n+/**\n+ * @fileoverview Warn for common attribute typos.\n+ * @author Koen Punt\n+ */\n+'use strict';\n+\n+var Components = require('../util/Components');\n+\n+// ------------------------------------------------------------------------------\n+// Rule Definition\n+// ------------------------------------------------------------------------------\n+\n+var PATTERN_REGEXP = new RegExp('^/(.+)/(.+)?$');\n+\n+/**\n+ * Convert pattern string to a regular expression.\n+ * @param {String|RegExp} string regex\n+ * @return {RegExp}\n+ */\n+function parsePattern(pattern) {\n+  if (pattern instanceof RegExp) {","path":"lib/rules/no-common-typos.js","position":21,"original_position":21,"commit_id":"b9596ad4406733f1cc245bfc15603192acbcf8a9","original_commit_id":"b9596ad4406733f1cc245bfc15603192acbcf8a9","user":{"login":"koenpunt","id":351038,"avatar_url":"https://avatars.githubusercontent.com/u/351038?v=3","gravatar_id":"","url":"https://api.github.com/users/koenpunt","html_url":"https://github.com/koenpunt","followers_url":"https://api.github.com/users/koenpunt/followers","following_url":"https://api.github.com/users/koenpunt/following{/other_user}","gists_url":"https://api.github.com/users/koenpunt/gists{/gist_id}","starred_url":"https://api.github.com/users/koenpunt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koenpunt/subscriptions","organizations_url":"https://api.github.com/users/koenpunt/orgs","repos_url":"https://api.github.com/users/koenpunt/repos","events_url":"https://api.github.com/users/koenpunt/events{/privacy}","received_events_url":"https://api.github.com/users/koenpunt/received_events","type":"User","site_admin":false},"body":"Because config can be JavaScript too:\r\n\r\n> Configuration Files - use a JavaScript, JSON or YAML\r\n> http://eslint.org/docs/user-guide/configuring","created_at":"2016-11-28T19:31:14Z","updated_at":"2016-11-28T19:31:14Z","html_url":"https://github.com/yannickcr/eslint-plugin-react/pull/981#discussion_r89862598","pull_request_url":"https://api.github.com/repos/yannickcr/eslint-plugin-react/pulls/981","_links":{"self":{"href":"https://api.github.com/repos/yannickcr/eslint-plugin-react/pulls/comments/89862598"},"html":{"href":"https://github.com/yannickcr/eslint-plugin-react/pull/981#discussion_r89862598"},"pull_request":{"href":"https://api.github.com/repos/yannickcr/eslint-plugin-react/pulls/981"}}},"pull_request":{"url":"https://api.github.com/repos/yannickcr/eslint-plugin-react/pulls/981","id":95560179,"html_url":"https://github.com/yannickcr/eslint-plugin-react/pull/981","diff_url":"https://github.com/yannickcr/eslint-plugin-react/pull/981.diff","patch_url":"https://github.com/yannickcr/eslint-plugin-react/pull/981.patch","issue_url":"https://api.github.com/repos/yannickcr/eslint-plugin-react/issues/981","number":981,"state":"open","locked":false,"title":"Add no-common-typos rule","user":{"login":"koenpunt","id":351038,"avatar_url":"https://avatars.githubusercontent.com/u/351038?v=3","gravatar_id":"","url":"https://api.github.com/users/koenpunt","html_url":"https://github.com/koenpunt","followers_url":"https://api.github.com/users/koenpunt/followers","following_url":"https://api.github.com/users/koenpunt/following{/other_user}","gists_url":"https://api.github.com/users/koenpunt/gists{/gist_id}","starred_url":"https://api.github.com/users/koenpunt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koenpunt/subscriptions","organizations_url":"https://api.github.com/users/koenpunt/orgs","repos_url":"https://api.github.com/users/koenpunt/repos","events_url":"https://api.github.com/users/koenpunt/events{/privacy}","received_events_url":"https://api.github.com/users/koenpunt/received_events","type":"User","site_admin":false},"body":"I had it quite some time that I incorrectly used `dangerouslySetInnerHtml` instead of `dangerouslySetInnerHTML`. \r\nTo prevent certain typos I introduce a rule for which you can set a pattern and the corrected string.\r\n\r\nI can imagine this might not only apply to attributes, in which case this rule could be extended to also validate props and other variables.\r\n\r\n**Todo:**\r\n- [ ] Documentation","created_at":"2016-11-28T19:20:18Z","updated_at":"2016-11-28T19:31:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7fd3410b5ae1851a19192839d178efefc5f87bef","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/yannickcr/eslint-plugin-react/pulls/981/commits","review_comments_url":"https://api.github.com/repos/yannickcr/eslint-plugin-react/pulls/981/comments","review_comment_url":"https://api.github.com/repos/yannickcr/eslint-plugin-react/pulls/comments{/number}","comments_url":"https://api.github.com/repos/yannickcr/eslint-plugin-react/issues/981/comments","statuses_url":"https://api.github.com/repos/yannickcr/eslint-plugin-react/statuses/b9596ad4406733f1cc245bfc15603192acbcf8a9","head":{"label":"koenpunt:no-common-typos","ref":"no-common-typos","sha":"b9596ad4406733f1cc245bfc15603192acbcf8a9","user":{"login":"koenpunt","id":351038,"avatar_url":"https://avatars.githubusercontent.com/u/351038?v=3","gravatar_id":"","url":"https://api.github.com/users/koenpunt","html_url":"https://github.com/koenpunt","followers_url":"https://api.github.com/users/koenpunt/followers","following_url":"https://api.github.com/users/koenpunt/following{/other_user}","gists_url":"https://api.github.com/users/koenpunt/gists{/gist_id}","starred_url":"https://api.github.com/users/koenpunt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koenpunt/subscriptions","organizations_url":"https://api.github.com/users/koenpunt/orgs","repos_url":"https://api.github.com/users/koenpunt/repos","events_url":"https://api.github.com/users/koenpunt/events{/privacy}","received_events_url":"https://api.github.com/users/koenpunt/received_events","type":"User","site_admin":false},"repo":{"id":75005938,"name":"eslint-plugin-react","full_name":"koenpunt/eslint-plugin-react","owner":{"login":"koenpunt","id":351038,"avatar_url":"https://avatars.githubusercontent.com/u/351038?v=3","gravatar_id":"","url":"https://api.github.com/users/koenpunt","html_url":"https://github.com/koenpunt","followers_url":"https://api.github.com/users/koenpunt/followers","following_url":"https://api.github.com/users/koenpunt/following{/other_user}","gists_url":"https://api.github.com/users/koenpunt/gists{/gist_id}","starred_url":"https://api.github.com/users/koenpunt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koenpunt/subscriptions","organizations_url":"https://api.github.com/users/koenpunt/orgs","repos_url":"https://api.github.com/users/koenpunt/repos","events_url":"https://api.github.com/users/koenpunt/events{/privacy}","received_events_url":"https://api.github.com/users/koenpunt/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/koenpunt/eslint-plugin-react","description":"React specific linting rules for ESLint","fork":true,"url":"https://api.github.com/repos/koenpunt/eslint-plugin-react","forks_url":"https://api.github.com/repos/koenpunt/eslint-plugin-react/forks","keys_url":"https://api.github.com/repos/koenpunt/eslint-plugin-react/keys{/key_id}","collaborators_url":"https://api.github.com/repos/koenpunt/eslint-plugin-react/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/koenpunt/eslint-plugin-react/teams","hooks_url":"https://api.github.com/repos/koenpunt/eslint-plugin-react/hooks","issue_events_url":"https://api.github.com/repos/koenpunt/eslint-plugin-react/issues/events{/number}","events_url":"https://api.github.com/repos/koenpunt/eslint-plugin-react/events","assignees_url":"https://api.github.com/repos/koenpunt/eslint-plugin-react/assignees{/user}","branches_url":"https://api.github.com/repos/koenpunt/eslint-plugin-react/branches{/branch}","tags_url":"https://api.github.com/repos/koenpunt/eslint-plugin-react/tags","blobs_url":"https://api.github.com/repos/koenpunt/eslint-plugin-react/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/koenpunt/eslint-plugin-react/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/koenpunt/eslint-plugin-react/git/refs{/sha}","trees_url":"https://api.github.com/repos/koenpunt/eslint-plugin-react/git/trees{/sha}","statuses_url":"https://api.github.com/repos/koenpunt/eslint-plugin-react/statuses/{sha}","languages_url":"https://api.github.com/repos/koenpunt/eslint-plugin-react/languages","stargazers_url":"https://api.github.com/repos/koenpunt/eslint-plugin-react/stargazers","contributors_url":"https://api.github.com/repos/koenpunt/eslint-plugin-react/contributors","subscribers_url":"https://api.github.com/repos/koenpunt/eslint-plugin-react/subscribers","subscription_url":"https://api.github.com/repos/koenpunt/eslint-plugin-react/subscription","commits_url":"https://api.github.com/repos/koenpunt/eslint-plugin-react/commits{/sha}","git_commits_url":"https://api.github.com/repos/koenpunt/eslint-plugin-react/git/commits{/sha}","comments_url":"https://api.github.com/repos/koenpunt/eslint-plugin-react/comments{/number}","issue_comment_url":"https://api.github.com/repos/koenpunt/eslint-plugin-react/issues/comments{/number}","contents_url":"https://api.github.com/repos/koenpunt/eslint-plugin-react/contents/{+path}","compare_url":"https://api.github.com/repos/koenpunt/eslint-plugin-react/compare/{base}...{head}","merges_url":"https://api.github.com/repos/koenpunt/eslint-plugin-react/merges","archive_url":"https://api.github.com/repos/koenpunt/eslint-plugin-react/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/koenpunt/eslint-plugin-react/downloads","issues_url":"https://api.github.com/repos/koenpunt/eslint-plugin-react/issues{/number}","pulls_url":"https://api.github.com/repos/koenpunt/eslint-plugin-react/pulls{/number}","milestones_url":"https://api.github.com/repos/koenpunt/eslint-plugin-react/milestones{/number}","notifications_url":"https://api.github.com/repos/koenpunt/eslint-plugin-react/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/koenpunt/eslint-plugin-react/labels{/name}","releases_url":"https://api.github.com/repos/koenpunt/eslint-plugin-react/releases{/id}","deployments_url":"https://api.github.com/repos/koenpunt/eslint-plugin-react/deployments","created_at":"2016-11-28T19:15:32Z","updated_at":"2016-11-28T19:15:34Z","pushed_at":"2016-11-28T19:21:50Z","git_url":"git://github.com/koenpunt/eslint-plugin-react.git","ssh_url":"git@github.com:koenpunt/eslint-plugin-react.git","clone_url":"https://github.com/koenpunt/eslint-plugin-react.git","svn_url":"https://github.com/koenpunt/eslint-plugin-react","homepage":null,"size":1778,"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":"yannickcr:master","ref":"master","sha":"0a40c27b1a94fe20477b136a34cb37a6c8163314","user":{"login":"yannickcr","id":13209,"avatar_url":"https://avatars.githubusercontent.com/u/13209?v=3","gravatar_id":"","url":"https://api.github.com/users/yannickcr","html_url":"https://github.com/yannickcr","followers_url":"https://api.github.com/users/yannickcr/followers","following_url":"https://api.github.com/users/yannickcr/following{/other_user}","gists_url":"https://api.github.com/users/yannickcr/gists{/gist_id}","starred_url":"https://api.github.com/users/yannickcr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yannickcr/subscriptions","organizations_url":"https://api.github.com/users/yannickcr/orgs","repos_url":"https://api.github.com/users/yannickcr/repos","events_url":"https://api.github.com/users/yannickcr/events{/privacy}","received_events_url":"https://api.github.com/users/yannickcr/received_events","type":"User","site_admin":false},"repo":{"id":28061676,"name":"eslint-plugin-react","full_name":"yannickcr/eslint-plugin-react","owner":{"login":"yannickcr","id":13209,"avatar_url":"https://avatars.githubusercontent.com/u/13209?v=3","gravatar_id":"","url":"https://api.github.com/users/yannickcr","html_url":"https://github.com/yannickcr","followers_url":"https://api.github.com/users/yannickcr/followers","following_url":"https://api.github.com/users/yannickcr/following{/other_user}","gists_url":"https://api.github.com/users/yannickcr/gists{/gist_id}","starred_url":"https://api.github.com/users/yannickcr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yannickcr/subscriptions","organizations_url":"https://api.github.com/users/yannickcr/orgs","repos_url":"https://api.github.com/users/yannickcr/repos","events_url":"https://api.github.com/users/yannickcr/events{/privacy}","received_events_url":"https://api.github.com/users/yannickcr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yannickcr/eslint-plugin-react","description":"React specific linting rules for ESLint","fork":false,"url":"https://api.github.com/repos/yannickcr/eslint-plugin-react","forks_url":"https://api.github.com/repos/yannickcr/eslint-plugin-react/forks","keys_url":"https://api.github.com/repos/yannickcr/eslint-plugin-react/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yannickcr/eslint-plugin-react/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yannickcr/eslint-plugin-react/teams","hooks_url":"https://api.github.com/repos/yannickcr/eslint-plugin-react/hooks","issue_events_url":"https://api.github.com/repos/yannickcr/eslint-plugin-react/issues/events{/number}","events_url":"https://api.github.com/repos/yannickcr/eslint-plugin-react/events","assignees_url":"https://api.github.com/repos/yannickcr/eslint-plugin-react/assignees{/user}","branches_url":"https://api.github.com/repos/yannickcr/eslint-plugin-react/branches{/branch}","tags_url":"https://api.github.com/repos/yannickcr/eslint-plugin-react/tags","blobs_url":"https://api.github.com/repos/yannickcr/eslint-plugin-react/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yannickcr/eslint-plugin-react/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yannickcr/eslint-plugin-react/git/refs{/sha}","trees_url":"https://api.github.com/repos/yannickcr/eslint-plugin-react/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yannickcr/eslint-plugin-react/statuses/{sha}","languages_url":"https://api.github.com/repos/yannickcr/eslint-plugin-react/languages","stargazers_url":"https://api.github.com/repos/yannickcr/eslint-plugin-react/stargazers","contributors_url":"https://api.github.com/repos/yannickcr/eslint-plugin-react/contributors","subscribers_url":"https://api.github.com/repos/yannickcr/eslint-plugin-react/subscribers","subscription_url":"https://api.github.com/repos/yannickcr/eslint-plugin-react/subscription","commits_url":"https://api.github.com/repos/yannickcr/eslint-plugin-react/commits{/sha}","git_commits_url":"https://api.github.com/repos/yannickcr/eslint-plugin-react/git/commits{/sha}","comments_url":"https://api.github.com/repos/yannickcr/eslint-plugin-react/comments{/number}","issue_comment_url":"https://api.github.com/repos/yannickcr/eslint-plugin-react/issues/comments{/number}","contents_url":"https://api.github.com/repos/yannickcr/eslint-plugin-react/contents/{+path}","compare_url":"https://api.github.com/repos/yannickcr/eslint-plugin-react/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yannickcr/eslint-plugin-react/merges","archive_url":"https://api.github.com/repos/yannickcr/eslint-plugin-react/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yannickcr/eslint-plugin-react/downloads","issues_url":"https://api.github.com/repos/yannickcr/eslint-plugin-react/issues{/number}","pulls_url":"https://api.github.com/repos/yannickcr/eslint-plugin-react/pulls{/number}","milestones_url":"https://api.github.com/repos/yannickcr/eslint-plugin-react/milestones{/number}","notifications_url":"https://api.github.com/repos/yannickcr/eslint-plugin-react/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yannickcr/eslint-plugin-react/labels{/name}","releases_url":"https://api.github.com/repos/yannickcr/eslint-plugin-react/releases{/id}","deployments_url":"https://api.github.com/repos/yannickcr/eslint-plugin-react/deployments","created_at":"2014-12-15T23:44:14Z","updated_at":"2016-11-28T15:08:14Z","pushed_at":"2016-11-28T19:21:50Z","git_url":"git://github.com/yannickcr/eslint-plugin-react.git","ssh_url":"git@github.com:yannickcr/eslint-plugin-react.git","clone_url":"https://github.com/yannickcr/eslint-plugin-react.git","svn_url":"https://github.com/yannickcr/eslint-plugin-react","homepage":null,"size":1778,"stargazers_count":1987,"watchers_count":1987,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":400,"mirror_url":null,"open_issues_count":205,"forks":400,"open_issues":205,"watchers":1987,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/yannickcr/eslint-plugin-react/pulls/981"},"html":{"href":"https://github.com/yannickcr/eslint-plugin-react/pull/981"},"issue":{"href":"https://api.github.com/repos/yannickcr/eslint-plugin-react/issues/981"},"comments":{"href":"https://api.github.com/repos/yannickcr/eslint-plugin-react/issues/981/comments"},"review_comments":{"href":"https://api.github.com/repos/yannickcr/eslint-plugin-react/pulls/981/comments"},"review_comment":{"href":"https://api.github.com/repos/yannickcr/eslint-plugin-react/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/yannickcr/eslint-plugin-react/pulls/981/commits"},"statuses":{"href":"https://api.github.com/repos/yannickcr/eslint-plugin-react/statuses/b9596ad4406733f1cc245bfc15603192acbcf8a9"}}}}
{"actor":{"display_login":"koenpunt"}}