{"action":"created","issue":{"url":"https://api.github.com/repos/eslint/eslint/issues/3544","labels_url":"https://api.github.com/repos/eslint/eslint/issues/3544/labels{/name}","comments_url":"https://api.github.com/repos/eslint/eslint/issues/3544/comments","events_url":"https://api.github.com/repos/eslint/eslint/issues/3544/events","html_url":"https://github.com/eslint/eslint/issues/3544","id":103503080,"number":3544,"title":"`object-shorthand` and `quote-props` have incompatibilities","user":{"login":"joakimbeng","id":1427383,"avatar_url":"https://avatars.githubusercontent.com/u/1427383?v=3","gravatar_id":"","url":"https://api.github.com/users/joakimbeng","html_url":"https://github.com/joakimbeng","followers_url":"https://api.github.com/users/joakimbeng/followers","following_url":"https://api.github.com/users/joakimbeng/following{/other_user}","gists_url":"https://api.github.com/users/joakimbeng/gists{/gist_id}","starred_url":"https://api.github.com/users/joakimbeng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joakimbeng/subscriptions","organizations_url":"https://api.github.com/users/joakimbeng/orgs","repos_url":"https://api.github.com/users/joakimbeng/repos","events_url":"https://api.github.com/users/joakimbeng/events{/privacy}","received_events_url":"https://api.github.com/users/joakimbeng/received_events","type":"User","site_admin":false},"labels":[{"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":13,"created_at":"2015-08-27T13:02:10Z","updated_at":"2015-08-28T10:07:31Z","closed_at":null,"body":"```bash\r\n$> eslint -v\r\nv1.2.1\r\n```\r\n\r\nMy `.eslintrc`:\r\n\r\n```json\r\n{\r\n  \"ecmaFeatures\": {\r\n    \"objectLiteralShorthandProperties\": true\r\n  },\r\n  \"rules\": {\r\n    \"quote-props\": [2, \"consistent\"],\r\n    \"object-shorthand\": [2, \"always\"]\r\n  }\r\n}\r\n```\r\n\r\nThe code:\r\n\r\n```javascript\r\nvar x = true;\r\n({\r\n  x,\r\n  'needs-quote': true\r\n});\r\n```\r\n\r\nRunning `eslint` gives the following output:\r\n\r\n```bash\r\nindex.js\r\n  2:2  error  Inconsistently quoted property `needs-quote` found  quote-props\r\n```\r\n\r\nChanging the code to:\r\n\r\n```javascript\r\nvar x = true;\r\n({\r\n  'x': x,\r\n  'needs-quote': true\r\n});\r\n```\r\n\r\nWill instead give the error:\r\n\r\n```bash\r\nindex.js\r\n  3:3  error  Expected property shorthand  object-shorthand\r\n```\r\n\r\nSo there's a Catch-22 between these two rules. I could of course rename the `x` variable to something else, but I would prefer to be able to use the object property shorthand syntax even when I have `\"consistent\"` or `\"consistent-as-needed\"` for the `quote-props` rule.\r\n\r\nWhat do you think? I could probably solve this myself and submit a PR but the question is what's actually the best solution for this? Or maybe you're of the opinion that this is by design and the rules should really be incompatible when using this combination of options?"},"comment":{"url":"https://api.github.com/repos/eslint/eslint/issues/comments/135726336","html_url":"https://github.com/eslint/eslint/issues/3544#issuecomment-135726336","issue_url":"https://api.github.com/repos/eslint/eslint/issues/3544","id":135726336,"user":{"login":"BYK","id":126780,"avatar_url":"https://avatars.githubusercontent.com/u/126780?v=3","gravatar_id":"","url":"https://api.github.com/users/BYK","html_url":"https://github.com/BYK","followers_url":"https://api.github.com/users/BYK/followers","following_url":"https://api.github.com/users/BYK/following{/other_user}","gists_url":"https://api.github.com/users/BYK/gists{/gist_id}","starred_url":"https://api.github.com/users/BYK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BYK/subscriptions","organizations_url":"https://api.github.com/users/BYK/orgs","repos_url":"https://api.github.com/users/BYK/repos","events_url":"https://api.github.com/users/BYK/events{/privacy}","received_events_url":"https://api.github.com/users/BYK/received_events","type":"User","site_admin":false},"created_at":"2015-08-28T10:07:31Z","updated_at":"2015-08-28T10:07:31Z","body":"Oh, boy - yeah. I was reading this all wrong for the whole time. Yeah it should ignore shorthand properties since there's no way you can use them with quotes anyways right?"}}