{"action":"created","issue":{"url":"https://api.github.com/repos/eslint/eslint/issues/4085","labels_url":"https://api.github.com/repos/eslint/eslint/issues/4085/labels{/name}","comments_url":"https://api.github.com/repos/eslint/eslint/issues/4085/comments","events_url":"https://api.github.com/repos/eslint/eslint/issues/4085/events","html_url":"https://github.com/eslint/eslint/issues/4085","id":110504551,"number":4085,"title":"no-undef does not catch Promise","user":{"login":"pmcelhaney","id":51504,"avatar_url":"https://avatars.githubusercontent.com/u/51504?v=3","gravatar_id":"","url":"https://api.github.com/users/pmcelhaney","html_url":"https://github.com/pmcelhaney","followers_url":"https://api.github.com/users/pmcelhaney/followers","following_url":"https://api.github.com/users/pmcelhaney/following{/other_user}","gists_url":"https://api.github.com/users/pmcelhaney/gists{/gist_id}","starred_url":"https://api.github.com/users/pmcelhaney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmcelhaney/subscriptions","organizations_url":"https://api.github.com/users/pmcelhaney/orgs","repos_url":"https://api.github.com/users/pmcelhaney/repos","events_url":"https://api.github.com/users/pmcelhaney/events{/privacy}","received_events_url":"https://api.github.com/users/pmcelhaney/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/breaking","name":"breaking","color":"e11d21"},{"url":"https://api.github.com/repos/eslint/eslint/labels/core","name":"core","color":"c7def8"},{"url":"https://api.github.com/repos/eslint/eslint/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/eslint/eslint/milestones/13","html_url":"https://github.com/eslint/eslint/milestones/v2.0.0","labels_url":"https://api.github.com/repos/eslint/eslint/milestones/13/labels","id":1277998,"number":13,"title":"v2.0.0","description":"","creator":{"login":"nzakas","id":38546,"avatar_url":"https://avatars.githubusercontent.com/u/38546?v=3","gravatar_id":"","url":"https://api.github.com/users/nzakas","html_url":"https://github.com/nzakas","followers_url":"https://api.github.com/users/nzakas/followers","following_url":"https://api.github.com/users/nzakas/following{/other_user}","gists_url":"https://api.github.com/users/nzakas/gists{/gist_id}","starred_url":"https://api.github.com/users/nzakas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nzakas/subscriptions","organizations_url":"https://api.github.com/users/nzakas/orgs","repos_url":"https://api.github.com/users/nzakas/repos","events_url":"https://api.github.com/users/nzakas/events{/privacy}","received_events_url":"https://api.github.com/users/nzakas/received_events","type":"User","site_admin":false},"open_issues":11,"closed_issues":2,"state":"open","created_at":"2015-08-28T17:36:35Z","updated_at":"2015-10-14T18:18:47Z","due_on":null,"closed_at":null},"comments":14,"created_at":"2015-10-08T17:35:55Z","updated_at":"2015-10-19T15:25:36Z","closed_at":null,"body":"The no-undef rule allows references to the global variable \"Promise\" even if it's not marked as a global (which is problematic because [IE does not have a global Promise](http://caniuse.com/#feat=promises).)\r\n\r\nHere's a test case, which can be added to the invalid section of no-undef.js.\r\n\r\n            { code: \"new Promise();\", errors: [{ message: \"\\\"Promise\\\" is not defined.\", type: \"Identifier\"}] },\r\n\r\nIf the bug is accepted I'm happy to create a patch.  \r\n\r\nESList version: 1.6.0 (ca3cc886f0eb65088c4cbe0585a74427f93422aa)\r\n\r\n\r\n<bountysource-plugin>\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/27267343-no-undef-does-not-catch-promise?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>"},"comment":{"url":"https://api.github.com/repos/eslint/eslint/issues/comments/149248883","html_url":"https://github.com/eslint/eslint/issues/4085#issuecomment-149248883","issue_url":"https://api.github.com/repos/eslint/eslint/issues/4085","id":149248883,"user":{"login":"michaelficarra","id":218840,"avatar_url":"https://avatars.githubusercontent.com/u/218840?v=3","gravatar_id":"","url":"https://api.github.com/users/michaelficarra","html_url":"https://github.com/michaelficarra","followers_url":"https://api.github.com/users/michaelficarra/followers","following_url":"https://api.github.com/users/michaelficarra/following{/other_user}","gists_url":"https://api.github.com/users/michaelficarra/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelficarra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelficarra/subscriptions","organizations_url":"https://api.github.com/users/michaelficarra/orgs","repos_url":"https://api.github.com/users/michaelficarra/repos","events_url":"https://api.github.com/users/michaelficarra/events{/privacy}","received_events_url":"https://api.github.com/users/michaelficarra/received_events","type":"User","site_admin":false},"created_at":"2015-10-19T15:25:36Z","updated_at":"2015-10-19T15:25:36Z","body":"Completely agree with @sindresorhus. That's exactly what I've been thinking as I've followed this thread."}}