{"action":"created","issue":{"url":"https://api.github.com/repos/eslint/eslint/issues/5234","repository_url":"https://api.github.com/repos/eslint/eslint","labels_url":"https://api.github.com/repos/eslint/eslint/issues/5234/labels{/name}","comments_url":"https://api.github.com/repos/eslint/eslint/issues/5234/comments","events_url":"https://api.github.com/repos/eslint/eslint/issues/5234/events","html_url":"https://github.com/eslint/eslint/issues/5234","id":133418115,"number":5234,"title":"Allow enforcing single/double-quotes without preventing use of template literals","user":{"login":"sindresorhus","id":170270,"avatar_url":"https://avatars.githubusercontent.com/u/170270?v=3","gravatar_id":"","url":"https://api.github.com/users/sindresorhus","html_url":"https://github.com/sindresorhus","followers_url":"https://api.github.com/users/sindresorhus/followers","following_url":"https://api.github.com/users/sindresorhus/following{/other_user}","gists_url":"https://api.github.com/users/sindresorhus/gists{/gist_id}","starred_url":"https://api.github.com/users/sindresorhus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sindresorhus/subscriptions","organizations_url":"https://api.github.com/users/sindresorhus/orgs","repos_url":"https://api.github.com/users/sindresorhus/repos","events_url":"https://api.github.com/users/sindresorhus/events{/privacy}","received_events_url":"https://api.github.com/users/sindresorhus/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/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/eslint/eslint/labels/rule","name":"rule","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":28,"created_at":"2016-02-13T09:46:32Z","updated_at":"2016-03-17T00:05:04Z","closed_at":null,"body":"How it worked in ESLint 1.0.0 worked perfectly. I could enforce single-quotes everywhere `'quotes': [2, 'single']` and still use template literals when convenient, e.g. if the content had single-quotes so not having to escape it. With ESLint 2.0.0 template literals are now awkwardly forced into the rule and there's no way to enforce single-quotes without also preventing use of template literals when they're not strictly required. I don't want to use double-quotes to prevent having to escape strings containing single-quotes. I want to use template literals, or rather, I already do, and this change makes everything break for me...\r\n\r\nI've read both https://github.com/eslint/eslint/issues/5147 and https://github.com/eslint/eslint/issues/3090, but I disagree with the conclusion and I think they're missing this use-case.\r\n\r\nTo be clear, this used to pass:\r\n\r\n```\r\n~/dev\r\n❯ eslint --version                                                                           \r\nv2.0.0\r\n                                                                                                                                               \r\n~/dev\r\n❯ echo \"var foo = \\`bar 'foo' baz\\`;\" | eslint --stdin --env=es6 --rule='quotes: [2, single]'\r\n\r\n<text>\r\n  1:11  error  Strings must use singlequote  quotes\r\n\r\n✖ 1 problem (1 error, 0 warnings)\r\n```\r\n\r\nI would like an option to allow this functionality."},"comment":{"url":"https://api.github.com/repos/eslint/eslint/issues/comments/197615365","html_url":"https://github.com/eslint/eslint/issues/5234#issuecomment-197615365","issue_url":"https://api.github.com/repos/eslint/eslint/issues/5234","id":197615365,"user":{"login":"BarryThePenguin","id":1351912,"avatar_url":"https://avatars.githubusercontent.com/u/1351912?v=3","gravatar_id":"","url":"https://api.github.com/users/BarryThePenguin","html_url":"https://github.com/BarryThePenguin","followers_url":"https://api.github.com/users/BarryThePenguin/followers","following_url":"https://api.github.com/users/BarryThePenguin/following{/other_user}","gists_url":"https://api.github.com/users/BarryThePenguin/gists{/gist_id}","starred_url":"https://api.github.com/users/BarryThePenguin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BarryThePenguin/subscriptions","organizations_url":"https://api.github.com/users/BarryThePenguin/orgs","repos_url":"https://api.github.com/users/BarryThePenguin/repos","events_url":"https://api.github.com/users/BarryThePenguin/events{/privacy}","received_events_url":"https://api.github.com/users/BarryThePenguin/received_events","type":"User","site_admin":false},"created_at":"2016-03-17T00:05:04Z","updated_at":"2016-03-17T00:05:04Z","body":"Would you look at a PR deprecating\r\n```\r\nquotes: [\"error\", \"double\", \"avoid-escape\"]\r\n```\r\n\r\nand using the suggested?\r\n\r\n```\r\nquotes: [\"error\", \"double\", {\r\n    avoidEscape: true,\r\n    allowTemplateLiterals: true\r\n}]\r\n```"}}