{"action":"created","issue":{"url":"https://api.github.com/repos/eslint/eslint/issues/2747","labels_url":"https://api.github.com/repos/eslint/eslint/issues/2747/labels{/name}","comments_url":"https://api.github.com/repos/eslint/eslint/issues/2747/comments","events_url":"https://api.github.com/repos/eslint/eslint/issues/2747/events","html_url":"https://github.com/eslint/eslint/issues/2747","id":87280882,"number":2747,"title":"\"block-scoped-var\" and \"no-use-before-define\" rules fail on mutual recursion","user":{"login":"RReverser","id":557590,"avatar_url":"https://avatars.githubusercontent.com/u/557590?v=3","gravatar_id":"","url":"https://api.github.com/users/RReverser","html_url":"https://github.com/RReverser","followers_url":"https://api.github.com/users/RReverser/followers","following_url":"https://api.github.com/users/RReverser/following{/other_user}","gists_url":"https://api.github.com/users/RReverser/gists{/gist_id}","starred_url":"https://api.github.com/users/RReverser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RReverser/subscriptions","organizations_url":"https://api.github.com/users/RReverser/orgs","repos_url":"https://api.github.com/users/RReverser/repos","events_url":"https://api.github.com/users/RReverser/events{/privacy}","received_events_url":"https://api.github.com/users/RReverser/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/eslint/eslint/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-06-11T09:37:37Z","updated_at":"2015-06-12T00:37:44Z","closed_at":null,"body":"Simplified my case to the following code:\r\n\r\n```javascript\r\nfunction a(n) {\r\n\treturn n > 0 ? b(n - 1) : \"a\";\r\n}\r\n\r\nfunction b(n) {\r\n\treturn n > 0 ? a(n - 1) : \"b\";\r\n}\r\n```\r\n\r\nAnd simplified eslintrc that allows to reproduce the issue:\r\n\r\n```json\r\n{\r\n  \"ecmaFeatures\": {\r\n    \"blockBindings\": true,\r\n    \"modules\": true\r\n  },\r\n  \"rules\": {\r\n    \"no-use-before-define\": 2,\r\n    \"block-scoped-var\": 2\r\n  }\r\n}\r\n```\r\n\r\nWithout `blockBindings` enabled, only `no-use-before-define` fails.\r\nTurning `modules` on/off doesn't affect the result, only adds `use strict`-related check in this case."},"comment":{"url":"https://api.github.com/repos/eslint/eslint/issues/comments/111314897","html_url":"https://github.com/eslint/eslint/issues/2747#issuecomment-111314897","issue_url":"https://api.github.com/repos/eslint/eslint/issues/2747","id":111314897,"user":{"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},"created_at":"2015-06-12T00:37:44Z","updated_at":"2015-06-12T00:37:44Z","body":"It looks like nofunc solves your problem here, and #2750 would take care of the rest of your concerns there. So let's focus this issue on `block-scoped-var`.\r\n\r\n`block-scoped-var` probably would need to be rewritten in order to properly support hoisting, as this looks like a bug."}}