quotes: avoidEscape option allow the usage of template string
See original GitHub issueTell us about your environment
- ESLint Version: 5.1.0/master
- Node Version: n/w
- npm Version: n/w
**What parser (default, Babel-ESLint, etc.) are you using?**default
Please show your full configuration:
Configuration
module.exports = {
extends: ['eslint'],
rules: {
"quotes": ["error", "double", {"avoidEscape": true}]
}
}
What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.
var s = `"hello world"`;
What did you expect to happen? no error reported. What actually happened? Please include the actual, raw output from ESLint.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:7
- Comments:9 (8 by maintainers)
Top Results From Across the Web
quotes - ESLint - Pluggable JavaScript Linter
Options · "avoidEscape": true allows strings to use single-quotes or double-quotes so long as the string contains a quote that would have to...
Read more >How to tell eslint that you prefer single quotes around your ...
This rule prefers single quotes, and allows template literals. ... option is to allow single or double quotes as long as the string...
Read more >quotemark - Rule
Enforces quote character for string literals. ... "avoid-escape" allows you to use the “other” quotemark in cases where escaping would normally be required....
Read more >Using quotation marks with strings in the AWS CLI
How to correctly use quotes with string values that contain spaces in the AWS CLI.
Read more >vue/html-quotes
Object option: avoidEscape ... If true , allows strings to use single-quotes or double-quotes so long as the string contains a quote that ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Also see: https://github.com/eslint/eslint/issues/7660
This is technically working as documented (the
avoidEscap
e option says “allows strings to use single-quotes or double-quotes so long as the string contains a quote that would have to be escaped otherwise”, but I’d be fine with changing it as an enhancement.ops, thanks for the ping! I like the idea in https://github.com/eslint/eslint/issues/12156, will champion it.