{"action":"created","issue":{"url":"https://api.github.com/repos/eslint/eslint/issues/2645","repository_url":"https://api.github.com/repos/eslint/eslint","labels_url":"https://api.github.com/repos/eslint/eslint/issues/2645/labels{/name}","comments_url":"https://api.github.com/repos/eslint/eslint/issues/2645/comments","events_url":"https://api.github.com/repos/eslint/eslint/issues/2645/events","html_url":"https://github.com/eslint/eslint/issues/2645","id":83039333,"number":2645,"title":"As of v0.22.0, `no-shadow` errors on function names","user":{"login":"ljharb","id":45469,"avatar_url":"https://avatars.githubusercontent.com/u/45469?v=3","gravatar_id":"","url":"https://api.github.com/users/ljharb","html_url":"https://github.com/ljharb","followers_url":"https://api.github.com/users/ljharb/followers","following_url":"https://api.github.com/users/ljharb/following{/other_user}","gists_url":"https://api.github.com/users/ljharb/gists{/gist_id}","starred_url":"https://api.github.com/users/ljharb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ljharb/subscriptions","organizations_url":"https://api.github.com/users/ljharb/orgs","repos_url":"https://api.github.com/users/ljharb/repos","events_url":"https://api.github.com/users/ljharb/events{/privacy}","received_events_url":"https://api.github.com/users/ljharb/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":"open","locked":false,"assignee":null,"milestone":null,"comments":33,"created_at":"2015-05-31T08:33:19Z","updated_at":"2016-03-02T23:22:05Z","closed_at":null,"body":"The `no-shadow` rule previously allowed:\r\n```js\r\nvar a = function a() {};\r\n```\r\n\r\nHowever, this appears to now warn, since the function's lexical name binding is technically shadowing the outer variable of the same name.\r\n\r\nThis is new breaking behavior - could there be a `no-shadow` option that ignores function names?\r\n\r\n<bountysource-plugin>\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/19114798-as-of-v0-22-0-no-shadow-errors-on-function-names?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/191489846","html_url":"https://github.com/eslint/eslint/issues/2645#issuecomment-191489846","issue_url":"https://api.github.com/repos/eslint/eslint/issues/2645","id":191489846,"user":{"login":"ljharb","id":45469,"avatar_url":"https://avatars.githubusercontent.com/u/45469?v=3","gravatar_id":"","url":"https://api.github.com/users/ljharb","html_url":"https://github.com/ljharb","followers_url":"https://api.github.com/users/ljharb/followers","following_url":"https://api.github.com/users/ljharb/following{/other_user}","gists_url":"https://api.github.com/users/ljharb/gists{/gist_id}","starred_url":"https://api.github.com/users/ljharb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ljharb/subscriptions","organizations_url":"https://api.github.com/users/ljharb/orgs","repos_url":"https://api.github.com/users/ljharb/repos","events_url":"https://api.github.com/users/ljharb/events{/privacy}","received_events_url":"https://api.github.com/users/ljharb/received_events","type":"User","site_admin":false},"created_at":"2016-03-02T23:22:04Z","updated_at":"2016-03-02T23:22:04Z","body":"This is still a problem - `echo 'var foo; foo = function foo() {};' | eslint --stdin --no-eslintrc --rule 'no-shadow: 2'` on v2.2 also prints out an error - i'm explicitly assigning a function expression to the variable it's shadowing, and I'd expect this to be allowed."}}