{"action":"created","issue":{"url":"https://api.github.com/repos/palantir/tslint/issues/3782","repository_url":"https://api.github.com/repos/palantir/tslint","labels_url":"https://api.github.com/repos/palantir/tslint/issues/3782/labels{/name}","comments_url":"https://api.github.com/repos/palantir/tslint/issues/3782/comments","events_url":"https://api.github.com/repos/palantir/tslint/issues/3782/events","html_url":"https://github.com/palantir/tslint/issues/3782","id":306694853,"number":3782,"title":"indent rule fails to catch unindented object literal","user":{"login":"rhys-vdw","id":822105,"avatar_url":"https://avatars0.githubusercontent.com/u/822105?v=4","gravatar_id":"","url":"https://api.github.com/users/rhys-vdw","html_url":"https://github.com/rhys-vdw","followers_url":"https://api.github.com/users/rhys-vdw/followers","following_url":"https://api.github.com/users/rhys-vdw/following{/other_user}","gists_url":"https://api.github.com/users/rhys-vdw/gists{/gist_id}","starred_url":"https://api.github.com/users/rhys-vdw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhys-vdw/subscriptions","organizations_url":"https://api.github.com/users/rhys-vdw/orgs","repos_url":"https://api.github.com/users/rhys-vdw/repos","events_url":"https://api.github.com/users/rhys-vdw/events{/privacy}","received_events_url":"https://api.github.com/users/rhys-vdw/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-20T01:26:40Z","updated_at":"2018-03-26T20:13:29Z","closed_at":null,"author_association":"NONE","body":"### Bug Report\r\n\r\n- __TSLint version__: 5.9.1\r\n- __TypeScript version__: 2.7.2\r\n- __Running TSLint via__: VSCode\r\n\r\n#### TypeScript code being linted\r\n\r\n```ts\r\nconst x = {\r\ny: 5,\r\n}\r\n```\r\n\r\nwith `tslint.json` configuration:\r\n\r\n```js\r\n{\r\n  \"defaultSeverity\": \"error\",\r\n   // ...\r\n  \"rules\": {\r\n     // ...\r\n    \"indent\": [true, \"spaces\", 2],\r\n     // ...\r\n  }\r\n}\r\n\r\n```\r\n\r\n#### Actual behavior\r\n\r\nNo error\r\n\r\n#### Expected behavior\r\n\r\nError on unindented key"},"comment":{"url":"https://api.github.com/repos/palantir/tslint/issues/comments/376296457","html_url":"https://github.com/palantir/tslint/issues/3782#issuecomment-376296457","issue_url":"https://api.github.com/repos/palantir/tslint/issues/3782","id":376296457,"user":{"login":"yarinr","id":4333914,"avatar_url":"https://avatars2.githubusercontent.com/u/4333914?v=4","gravatar_id":"","url":"https://api.github.com/users/yarinr","html_url":"https://github.com/yarinr","followers_url":"https://api.github.com/users/yarinr/followers","following_url":"https://api.github.com/users/yarinr/following{/other_user}","gists_url":"https://api.github.com/users/yarinr/gists{/gist_id}","starred_url":"https://api.github.com/users/yarinr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yarinr/subscriptions","organizations_url":"https://api.github.com/users/yarinr/orgs","repos_url":"https://api.github.com/users/yarinr/repos","events_url":"https://api.github.com/users/yarinr/events{/privacy}","received_events_url":"https://api.github.com/users/yarinr/received_events","type":"User","site_admin":false},"created_at":"2018-03-26T20:13:29Z","updated_at":"2018-03-26T20:13:29Z","author_association":"NONE","body":"I believe the indent rule is only suppose to detect usage of the wrong kind of indentation (as in a tabs when it was configured to only allow spaces).\r\n\r\nIt does not enforce \"correct\" indentation of constructs. Your complaint is not unique to object literals:\r\n```typescript\r\nif (true) {\r\nconsole.log(\"Hello!\");\r\n}\r\n```\r\nWill not raise an error - and the same goes for any other unindented construct."}}
{"actor":{"display_login":"yarinr"}}