{"action":"created","issue":{"url":"https://api.github.com/repos/eslint/eslint/issues/4141","labels_url":"https://api.github.com/repos/eslint/eslint/issues/4141/labels{/name}","comments_url":"https://api.github.com/repos/eslint/eslint/issues/4141/comments","events_url":"https://api.github.com/repos/eslint/eslint/issues/4141/events","html_url":"https://github.com/eslint/eslint/issues/4141","id":111542224,"number":4141,"title":"`array-bracket-spacing` for empty array","user":{"login":"andy-hanson","id":5387404,"avatar_url":"https://avatars.githubusercontent.com/u/5387404?v=3","gravatar_id":"","url":"https://api.github.com/users/andy-hanson","html_url":"https://github.com/andy-hanson","followers_url":"https://api.github.com/users/andy-hanson/followers","following_url":"https://api.github.com/users/andy-hanson/following{/other_user}","gists_url":"https://api.github.com/users/andy-hanson/gists{/gist_id}","starred_url":"https://api.github.com/users/andy-hanson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andy-hanson/subscriptions","organizations_url":"https://api.github.com/users/andy-hanson/orgs","repos_url":"https://api.github.com/users/andy-hanson/repos","events_url":"https://api.github.com/users/andy-hanson/events{/privacy}","received_events_url":"https://api.github.com/users/andy-hanson/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":9,"created_at":"2015-10-15T04:17:07Z","updated_at":"2015-10-15T22:13:58Z","closed_at":null,"body":"When linting this code:\r\n\r\n\t[ ]\r\n\r\nwith this config:\r\n\r\n\t{\r\n\t\t\"eslintConfig\": {\r\n\t\t\t\"rules\": {\r\n\t\t\t\t\"array-bracket-spacing\": 1\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\nI would expect to see an error like:\r\n\r\n\t1:1  warning  There should be no space after '['   array-bracket-spacing\r\n\r\nInstead, there is no warning.\r\n\r\n(My `eslint -v`: 1.6.0)\r\n\r\n\r\n<bountysource-plugin>\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/27423783-array-bracket-spacing-for-empty-array?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/148538269","html_url":"https://github.com/eslint/eslint/issues/4141#issuecomment-148538269","issue_url":"https://api.github.com/repos/eslint/eslint/issues/4141","id":148538269,"user":{"login":"alberto","id":72561,"avatar_url":"https://avatars.githubusercontent.com/u/72561?v=3","gravatar_id":"","url":"https://api.github.com/users/alberto","html_url":"https://github.com/alberto","followers_url":"https://api.github.com/users/alberto/followers","following_url":"https://api.github.com/users/alberto/following{/other_user}","gists_url":"https://api.github.com/users/alberto/gists{/gist_id}","starred_url":"https://api.github.com/users/alberto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alberto/subscriptions","organizations_url":"https://api.github.com/users/alberto/orgs","repos_url":"https://api.github.com/users/alberto/repos","events_url":"https://api.github.com/users/alberto/events{/privacy}","received_events_url":"https://api.github.com/users/alberto/received_events","type":"User","site_admin":false},"created_at":"2015-10-15T22:13:58Z","updated_at":"2015-10-15T22:13:58Z","body":"The bug is allowing an empty array with spaces `[ ]` when the default `never` option is set.\r\n\r\nThe doc doesn't say that is expected behaviour, but just for `always`.\r\n\r\n`Note that `\"always\"` has a special case where `{}` and `[]` are not considered problems.`\r\n\r\nIf it is expected behaviour the docs should also reflect that."}}