{"action":"created","issue":{"url":"https://api.github.com/repos/eslint/eslint/issues/2111","labels_url":"https://api.github.com/repos/eslint/eslint/issues/2111/labels{/name}","comments_url":"https://api.github.com/repos/eslint/eslint/issues/2111/comments","events_url":"https://api.github.com/repos/eslint/eslint/issues/2111/events","html_url":"https://github.com/eslint/eslint/issues/2111","id":63011343,"number":2111,"title":"`block-scoped-var` throws an error if missing parameter in destructuring","user":{"login":"dahjelle","id":156557,"avatar_url":"https://avatars.githubusercontent.com/u/156557?v=3","gravatar_id":"","url":"https://api.github.com/users/dahjelle","html_url":"https://github.com/dahjelle","followers_url":"https://api.github.com/users/dahjelle/followers","following_url":"https://api.github.com/users/dahjelle/following{/other_user}","gists_url":"https://api.github.com/users/dahjelle/gists{/gist_id}","starred_url":"https://api.github.com/users/dahjelle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dahjelle/subscriptions","organizations_url":"https://api.github.com/users/dahjelle/orgs","repos_url":"https://api.github.com/users/dahjelle/repos","events_url":"https://api.github.com/users/dahjelle/events{/privacy}","received_events_url":"https://api.github.com/users/dahjelle/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/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/eslint/eslint/labels/rule","name":"rule","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-19T15:09:36Z","updated_at":"2015-03-19T15:18:01Z","closed_at":null,"body":"Running `eslint` on the following file:\r\n\r\n```javascript\r\nvar foo = function([, bar]) {\r\n  return bar;\r\n};\r\n```\r\n\r\nthrows this error\r\n\r\n```\r\n.../eslint/lib/rules/block-scoped-var.js:142\r\n                    declarations.push(element.name);\r\n                                             ^\r\nTypeError: Cannot read property 'name' of null\r\n    at .../eslint/lib/rules/block-scoped-var.js:142:46\r\n    at Array.forEach (native)\r\n    at declareByNodeType (.../eslint/lib/rules/block-scoped-var.js:141:31)\r\n    at .../eslint/lib/rules/block-scoped-var.js:157:13\r\n    at Array.forEach (native)\r\n    at EventEmitter.functionHandler (.../eslint/lib/rules/block-scoped-var.js:156:21)\r\n    at EventEmitter.emit (events.js:117:20)\r\n    at Controller.controller.traverse.enter (.../eslint/lib/eslint.js:735:25)\r\n    at Controller.__execute (.../eslint/node_modules/estraverse/estraverse.js:393:31)\r\n    at Controller.traverse (.../eslint/node_modules/estraverse/estraverse.js:491:28)\r\n```\r\n\r\nI'm running `eslint` v0.17.1 with the following `.eslintrc` (with `strict` and `no-unused-vars` turned off for clarity)\r\n\r\n```json\r\n{\r\n  \"env\": {\r\n    \"es6\": true\r\n  },\r\n  \"rules\": {\r\n    \"strict\": 0,\r\n    \"no-unused-vars\": 0,\r\n    \"block-scoped-var\": 2\r\n  }\r\n}\r\n```\r\n\r\nI imagine it should show a lint error (or perhaps another rule should), but I don't think it should crash."},"comment":{"url":"https://api.github.com/repos/eslint/eslint/issues/comments/83623517","html_url":"https://github.com/eslint/eslint/issues/2111#issuecomment-83623517","issue_url":"https://api.github.com/repos/eslint/eslint/issues/2111","id":83623517,"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-03-19T15:18:01Z","updated_at":"2015-03-19T15:18:01Z","body":"Thanks, we will get that fixed."}}