{"action":"closed","issue":{"url":"https://api.github.com/repos/palantir/tslint/issues/2210","repository_url":"https://api.github.com/repos/palantir/tslint","labels_url":"https://api.github.com/repos/palantir/tslint/issues/2210/labels{/name}","comments_url":"https://api.github.com/repos/palantir/tslint/issues/2210/comments","events_url":"https://api.github.com/repos/palantir/tslint/issues/2210/events","html_url":"https://github.com/palantir/tslint/issues/2210","id":208156849,"number":2210,"title":"Wrong no-use-before-declare error","user":{"login":"MikeVitik","id":6543995,"avatar_url":"https://avatars3.githubusercontent.com/u/6543995?v=3","gravatar_id":"","url":"https://api.github.com/users/MikeVitik","html_url":"https://github.com/MikeVitik","followers_url":"https://api.github.com/users/MikeVitik/followers","following_url":"https://api.github.com/users/MikeVitik/following{/other_user}","gists_url":"https://api.github.com/users/MikeVitik/gists{/gist_id}","starred_url":"https://api.github.com/users/MikeVitik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MikeVitik/subscriptions","organizations_url":"https://api.github.com/users/MikeVitik/orgs","repos_url":"https://api.github.com/users/MikeVitik/repos","events_url":"https://api.github.com/users/MikeVitik/events{/privacy}","received_events_url":"https://api.github.com/users/MikeVitik/received_events","type":"User","site_admin":false},"labels":[{"id":243410817,"url":"https://api.github.com/repos/palantir/tslint/labels/P3","name":"P3","color":"999999","default":false},{"id":234815875,"url":"https://api.github.com/repos/palantir/tslint/labels/Status:%20Accepting%20PRs","name":"Status: Accepting PRs","color":"0052cc","default":false},{"id":49399915,"url":"https://api.github.com/repos/palantir/tslint/labels/Type:%20Bug","name":"Type: Bug","color":"fc2929","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-02-16T15:38:07Z","updated_at":"2017-03-14T17:46:15Z","closed_at":"2017-03-14T17:46:15Z","body":"### Bug Report\r\n\r\n- __TSLint version__: `\"~4.4.2\"`\r\n- __TypeScript version__: `2.1.5`\r\n- __Running TSLint via__: Visual Studio Code\r\n\r\n#### TypeScript code being linted\r\n\r\n```ts\r\nclass Greeter {\r\n    greet(options: { str: string }) {\r\n        var {str} = options;\r\n        return str;\r\n    }\r\n}\r\n```\r\n\r\nwith `tslint.json` configuration:\r\n\r\n```json\r\n{\r\n  \"rules\": {\r\n    \"ban\": [true,\r\n        [\"_\", \"extend\"],\r\n        [\"_\", \"isNull\"],\r\n        [\"_\", \"isDefined\"]\r\n    ],\r\n    \"class-name\": true,\r\n    \"curly\": true,\r\n    \"eofline\": false,\r\n    \"forin\": false,\r\n    \"indent\": [true, 4],\r\n    \"interface-name\": true,\r\n    \"jsdoc-format\": true,\r\n    \"label-position\": true,\r\n    \"max-line-length\": [true, 250],\r\n    \"no-arg\": true,\r\n    \"no-bitwise\": true,\r\n    \"no-console\": [true,\r\n        \"debug\",\r\n        \"info\",\r\n        \"time\",\r\n        \"timeEnd\",\r\n        \"trace\"\r\n    ],\r\n    \"no-construct\": true,\r\n    \"no-debugger\": true,\r\n    \"no-duplicate-variable\": true,\r\n    \"no-empty\": false,\r\n    \"no-eval\": true,\r\n    \"no-string-literal\": false,\r\n    \"trailing-comma\": true,\r\n    \"no-trailing-whitespace\": true,\r\n    \"no-unused-expression\": true,\r\n    \"no-unused-variable\": true,\r\n    \"no-use-before-declare\": true,\r\n    \"one-line\": [true,\r\n        \"check-open-brace\",\r\n        \"check-catch\",\r\n        \"check-whitespace\"\r\n    ],\r\n    \"quotemark\": [true, \"double\"],\r\n    \"radix\": true,\r\n    \"semicolon\": true,\r\n    \"triple-equals\": [true, \"allow-null-check\"],\r\n    \"typedef\": [true,\r\n        \"indexSignature\",\r\n        \"propertySignature\"\r\n    ],\r\n    \"typedef-whitespace\": [true,\r\n        [\"callSignature\", \"noSpace\"],\r\n        [\"catchClause\", \"noSpace\"],\r\n        [\"indexSignature\", \"space\"]\r\n    ],\r\n    \"variable-name\": false,\r\n    \"whitespace\": [false,\r\n        \"check-branch\",\r\n        \"check-decl\",\r\n        \"check-operator\",\r\n        \"check-separator\",\r\n        \"check-type\"\r\n    ]\r\n  }\r\n}```\r\n\r\n#### Actual behavior\r\nmessage: 'variable 'str' used before declaration (no-use-before-declare)'at: '2,22'source: 'tslint'\r\n\r\n#### Expected behavior\r\n\r\nno error\r\n\r\n"}}
{"actor":{"display_login":"nchen63"}}