{"action":"opened","issue":{"url":"https://api.github.com/repos/eslint/eslint/issues/7153","repository_url":"https://api.github.com/repos/eslint/eslint","labels_url":"https://api.github.com/repos/eslint/eslint/issues/7153/labels{/name}","comments_url":"https://api.github.com/repos/eslint/eslint/issues/7153/comments","events_url":"https://api.github.com/repos/eslint/eslint/issues/7153/events","html_url":"https://github.com/eslint/eslint/issues/7153","id":176837088,"number":7153,"title":"consistent-this shouldn't flag up assignment of this to a variable outside current function.","user":{"login":"LukeusMaximus","id":866571,"avatar_url":"https://avatars.githubusercontent.com/u/866571?v=3","gravatar_id":"","url":"https://api.github.com/users/LukeusMaximus","html_url":"https://github.com/LukeusMaximus","followers_url":"https://api.github.com/users/LukeusMaximus/followers","following_url":"https://api.github.com/users/LukeusMaximus/following{/other_user}","gists_url":"https://api.github.com/users/LukeusMaximus/gists{/gist_id}","starred_url":"https://api.github.com/users/LukeusMaximus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LukeusMaximus/subscriptions","organizations_url":"https://api.github.com/users/LukeusMaximus/orgs","repos_url":"https://api.github.com/users/LukeusMaximus/repos","events_url":"https://api.github.com/users/LukeusMaximus/events{/privacy}","received_events_url":"https://api.github.com/users/LukeusMaximus/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-14T07:41:56Z","updated_at":"2016-09-14T07:41:56Z","closed_at":null,"body":"**What version are you using?**\r\nv3.4.0\r\n**What did you do?**\r\n```\r\nlet someVariable = null\r\n\r\nfunction someFunction() {\r\n    someVariable = this;\r\n    ...\r\n}\r\n```\r\n**What happened?**\r\nESLint reported that `someVariable` is an unexpected alias of `this` (consistent-this)\r\n**What did you expect to happen?**\r\nESLint not to flag this up as a contravention of the consistent-this rule because the assignment statement is assigning `this` to a variable outside the current function. Attempts to alias `this` are always an assignment to a variable declared within the current function.\r\n\r\n"}}
{"actor":{"display_login":"LukeusMaximus"}}