{"action":"created","comment":{"url":"https://api.github.com/repos/eslint/eslint/pulls/comments/45546996","id":45546996,"diff_hunk":"@@ -30,8 +52,86 @@ The following patterns are not considered problems:\n var obj = { x: \"foo\" },\n     key = \"x\",\n     value = obj[key];\n+\n+class A {\n+    foo() {\n+        // This is a user-defined method.\n+        this.eval(\"var a = 0\");\n+    }\n+\n+    eval() {\n+    }\n+}\n+```\n+\n+### Options\n+\n+This rule has an option to allow calls of indirect `eval`.\n+Calls of indirect `eval` are dangerous less than calls of direct `eval` relatively.","path":"docs/rules/no-eval.md","position":null,"original_position":48,"commit_id":"13c8b06f183d0e80945ac0ae323c787a0fb73864","original_commit_id":"e03d88021d0514bd1ee7aa99675ca47cf0f711cd","user":{"login":"ilyavolodin","id":1380062,"avatar_url":"https://avatars.githubusercontent.com/u/1380062?v=3","gravatar_id":"","url":"https://api.github.com/users/ilyavolodin","html_url":"https://github.com/ilyavolodin","followers_url":"https://api.github.com/users/ilyavolodin/followers","following_url":"https://api.github.com/users/ilyavolodin/following{/other_user}","gists_url":"https://api.github.com/users/ilyavolodin/gists{/gist_id}","starred_url":"https://api.github.com/users/ilyavolodin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ilyavolodin/subscriptions","organizations_url":"https://api.github.com/users/ilyavolodin/orgs","repos_url":"https://api.github.com/users/ilyavolodin/repos","events_url":"https://api.github.com/users/ilyavolodin/events{/privacy}","received_events_url":"https://api.github.com/users/ilyavolodin/received_events","type":"User","site_admin":false},"body":"Yes, what @michaelficarra said is much better!:-)","created_at":"2015-11-21T15:07:21Z","updated_at":"2015-11-21T15:07:21Z","html_url":"https://github.com/eslint/eslint/pull/4505#discussion_r45546996","pull_request_url":"https://api.github.com/repos/eslint/eslint/pulls/4505","_links":{"self":{"href":"https://api.github.com/repos/eslint/eslint/pulls/comments/45546996"},"html":{"href":"https://github.com/eslint/eslint/pull/4505#discussion_r45546996"},"pull_request":{"href":"https://api.github.com/repos/eslint/eslint/pulls/4505"}}},"pull_request":{"url":"https://api.github.com/repos/eslint/eslint/pulls/4505","id":51438415,"html_url":"https://github.com/eslint/eslint/pull/4505","diff_url":"https://github.com/eslint/eslint/pull/4505.diff","patch_url":"https://github.com/eslint/eslint/pull/4505.patch","issue_url":"https://api.github.com/repos/eslint/eslint/issues/4505","number":4505,"state":"open","locked":false,"title":"Fix: `no-eval` come to catch indirect eval","user":{"login":"mysticatea","id":1937871,"avatar_url":"https://avatars.githubusercontent.com/u/1937871?v=3","gravatar_id":"","url":"https://api.github.com/users/mysticatea","html_url":"https://github.com/mysticatea","followers_url":"https://api.github.com/users/mysticatea/followers","following_url":"https://api.github.com/users/mysticatea/following{/other_user}","gists_url":"https://api.github.com/users/mysticatea/gists{/gist_id}","starred_url":"https://api.github.com/users/mysticatea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mysticatea/subscriptions","organizations_url":"https://api.github.com/users/mysticatea/orgs","repos_url":"https://api.github.com/users/mysticatea/repos","events_url":"https://api.github.com/users/mysticatea/events{/privacy}","received_events_url":"https://api.github.com/users/mysticatea/received_events","type":"User","site_admin":false},"body":"Fixes #4399, #4441\r\n\r\n- Functions to detect `this` binding is default were extracted to AST\r\nUtils from `no-invalid-this`. And `no-eval` is using this utility.\r\n- `allowIndirect` option was added to `no-eval` in order to keep old\r\nbehavior.","created_at":"2015-11-21T10:15:30Z","updated_at":"2015-11-21T15:07:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"17f525484172e9952958db37e29b9023887fb0de","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/eslint/eslint/pulls/4505/commits","review_comments_url":"https://api.github.com/repos/eslint/eslint/pulls/4505/comments","review_comment_url":"https://api.github.com/repos/eslint/eslint/pulls/comments{/number}","comments_url":"https://api.github.com/repos/eslint/eslint/issues/4505/comments","statuses_url":"https://api.github.com/repos/eslint/eslint/statuses/13c8b06f183d0e80945ac0ae323c787a0fb73864","head":{"label":"mysticatea:no-eval/detect-indirect-eval","ref":"no-eval/detect-indirect-eval","sha":"13c8b06f183d0e80945ac0ae323c787a0fb73864","user":{"login":"mysticatea","id":1937871,"avatar_url":"https://avatars.githubusercontent.com/u/1937871?v=3","gravatar_id":"","url":"https://api.github.com/users/mysticatea","html_url":"https://github.com/mysticatea","followers_url":"https://api.github.com/users/mysticatea/followers","following_url":"https://api.github.com/users/mysticatea/following{/other_user}","gists_url":"https://api.github.com/users/mysticatea/gists{/gist_id}","starred_url":"https://api.github.com/users/mysticatea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mysticatea/subscriptions","organizations_url":"https://api.github.com/users/mysticatea/orgs","repos_url":"https://api.github.com/users/mysticatea/repos","events_url":"https://api.github.com/users/mysticatea/events{/privacy}","received_events_url":"https://api.github.com/users/mysticatea/received_events","type":"User","site_admin":false},"repo":{"id":34937068,"name":"eslint","full_name":"mysticatea/eslint","owner":{"login":"mysticatea","id":1937871,"avatar_url":"https://avatars.githubusercontent.com/u/1937871?v=3","gravatar_id":"","url":"https://api.github.com/users/mysticatea","html_url":"https://github.com/mysticatea","followers_url":"https://api.github.com/users/mysticatea/followers","following_url":"https://api.github.com/users/mysticatea/following{/other_user}","gists_url":"https://api.github.com/users/mysticatea/gists{/gist_id}","starred_url":"https://api.github.com/users/mysticatea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mysticatea/subscriptions","organizations_url":"https://api.github.com/users/mysticatea/orgs","repos_url":"https://api.github.com/users/mysticatea/repos","events_url":"https://api.github.com/users/mysticatea/events{/privacy}","received_events_url":"https://api.github.com/users/mysticatea/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mysticatea/eslint","description":"A fully pluggable tool for identifying and reporting on patterns in JavaScript.","fork":true,"url":"https://api.github.com/repos/mysticatea/eslint","forks_url":"https://api.github.com/repos/mysticatea/eslint/forks","keys_url":"https://api.github.com/repos/mysticatea/eslint/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mysticatea/eslint/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mysticatea/eslint/teams","hooks_url":"https://api.github.com/repos/mysticatea/eslint/hooks","issue_events_url":"https://api.github.com/repos/mysticatea/eslint/issues/events{/number}","events_url":"https://api.github.com/repos/mysticatea/eslint/events","assignees_url":"https://api.github.com/repos/mysticatea/eslint/assignees{/user}","branches_url":"https://api.github.com/repos/mysticatea/eslint/branches{/branch}","tags_url":"https://api.github.com/repos/mysticatea/eslint/tags","blobs_url":"https://api.github.com/repos/mysticatea/eslint/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mysticatea/eslint/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mysticatea/eslint/git/refs{/sha}","trees_url":"https://api.github.com/repos/mysticatea/eslint/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mysticatea/eslint/statuses/{sha}","languages_url":"https://api.github.com/repos/mysticatea/eslint/languages","stargazers_url":"https://api.github.com/repos/mysticatea/eslint/stargazers","contributors_url":"https://api.github.com/repos/mysticatea/eslint/contributors","subscribers_url":"https://api.github.com/repos/mysticatea/eslint/subscribers","subscription_url":"https://api.github.com/repos/mysticatea/eslint/subscription","commits_url":"https://api.github.com/repos/mysticatea/eslint/commits{/sha}","git_commits_url":"https://api.github.com/repos/mysticatea/eslint/git/commits{/sha}","comments_url":"https://api.github.com/repos/mysticatea/eslint/comments{/number}","issue_comment_url":"https://api.github.com/repos/mysticatea/eslint/issues/comments{/number}","contents_url":"https://api.github.com/repos/mysticatea/eslint/contents/{+path}","compare_url":"https://api.github.com/repos/mysticatea/eslint/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mysticatea/eslint/merges","archive_url":"https://api.github.com/repos/mysticatea/eslint/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mysticatea/eslint/downloads","issues_url":"https://api.github.com/repos/mysticatea/eslint/issues{/number}","pulls_url":"https://api.github.com/repos/mysticatea/eslint/pulls{/number}","milestones_url":"https://api.github.com/repos/mysticatea/eslint/milestones{/number}","notifications_url":"https://api.github.com/repos/mysticatea/eslint/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mysticatea/eslint/labels{/name}","releases_url":"https://api.github.com/repos/mysticatea/eslint/releases{/id}","created_at":"2015-05-02T05:43:17Z","updated_at":"2015-05-02T05:43:21Z","pushed_at":"2015-11-21T15:06:43Z","git_url":"git://github.com/mysticatea/eslint.git","ssh_url":"git@github.com:mysticatea/eslint.git","clone_url":"https://github.com/mysticatea/eslint.git","svn_url":"https://github.com/mysticatea/eslint","homepage":"http://eslint.org","size":8201,"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":"eslint:master","ref":"master","sha":"1a7997bab0f4a058ccd2cc210ed05d824c2c2978","user":{"login":"eslint","id":6019716,"avatar_url":"https://avatars.githubusercontent.com/u/6019716?v=3","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://avatars.githubusercontent.com/u/6019716?v=3","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}","created_at":"2013-06-29T23:59:48Z","updated_at":"2015-11-21T12:18:55Z","pushed_at":"2015-11-21T15:06:44Z","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":"http://eslint.org","size":11019,"stargazers_count":3408,"watchers_count":3408,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":647,"mirror_url":null,"open_issues_count":206,"forks":647,"open_issues":206,"watchers":3408,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/eslint/eslint/pulls/4505"},"html":{"href":"https://github.com/eslint/eslint/pull/4505"},"issue":{"href":"https://api.github.com/repos/eslint/eslint/issues/4505"},"comments":{"href":"https://api.github.com/repos/eslint/eslint/issues/4505/comments"},"review_comments":{"href":"https://api.github.com/repos/eslint/eslint/pulls/4505/comments"},"review_comment":{"href":"https://api.github.com/repos/eslint/eslint/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/eslint/eslint/pulls/4505/commits"},"statuses":{"href":"https://api.github.com/repos/eslint/eslint/statuses/13c8b06f183d0e80945ac0ae323c787a0fb73864"}}}}