{"action":"closed","issue":{"url":"https://api.github.com/repos/eslint/eslint/issues/4441","labels_url":"https://api.github.com/repos/eslint/eslint/issues/4441/labels{/name}","comments_url":"https://api.github.com/repos/eslint/eslint/issues/4441/comments","events_url":"https://api.github.com/repos/eslint/eslint/issues/4441/events","html_url":"https://github.com/eslint/eslint/issues/4441","id":117082821,"number":4441,"title":"Rule Option Proposal: `no-eval` allows indirect-evals","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},"labels":[{"url":"https://api.github.com/repos/eslint/eslint/labels/accepted","name":"accepted","color":"0052cc"},{"url":"https://api.github.com/repos/eslint/eslint/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/eslint/eslint/labels/rule","name":"rule","color":"fbca04"}],"state":"closed","locked":false,"assignee":{"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},"milestone":null,"comments":4,"created_at":"2015-11-16T09:28:11Z","updated_at":"2015-12-01T20:18:42Z","closed_at":"2015-12-01T20:18:42Z","body":"Spawned from #4399 \r\n\r\nIndirect `eval` calls are not danger relatively than direct `eval` calls.\r\nSo I propose an option to allow indirect `eval` calls.\r\n\r\n```js\r\n{\r\n    \"no-eval\": [2, {\"allowIndirect\": true}] // default is false\r\n}\r\n```\r\n\r\nThis option considers the following patterns are problem:\r\n\r\n```js\r\neval(\"var a = 0\");\r\n```\r\n\r\nThis option considers the following patterns are NOT problem:\r\n\r\n```js\r\n(0, eval)(\"var a = 0\");\r\n\r\nfunction foo(eval) {\r\n    eval(\"var a = 0\");\r\n}\r\nfoo(eval);\r\n```\r\n\r\nI'm happy to work on this.\r\n\r\n<bountysource-plugin>\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/28279827-rule-option-proposal-no-eval-allows-indirect-evals?utm_campaign=plugin&utm_content=tracker%2F282608&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F282608&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"}}