-
Notifications
You must be signed in to change notification settings - Fork 887
Add option to quotemark rule to disallow all quotes #539
Comments
the corresponding option in eslint is called |
Keen to see this! I want to use backticks everywhere instead of single/double quotes. https://ponyfoo.com/articles/template-literals-strictly-better-strings |
Supporting this; using backticks by default has the benefits of not needing to escape quotes and not needing to convert string literals to template literals in case interpolation needs to be used. The current quotemark rule feels backwards in only having options for disallowing backticks. |
Can someone familiar with this part get a PR up for this? I would (and could) do it, but I don't even know where to start... |
Took a stab at that PR. @adidahiya or other contributors, could y'all take a look? |
This lets users enforce only backtick "`" strings for everywhere that it's permissible. This also simplifies some logic in the preferred quote determination, combining some disparate logic into the nice self-packaged functions. > See #539 > The corresponding option in eslint is called "backtick": http://eslint.org/docs/rules/quotes > See https://ponyfoo.com/articles/template-literals-strictly-better-strings
Looks like #4029 fixed this! 🎉 |
A valid coding style would be to only use template strings for all strings.
Ideas for the rule option name:
none
backtick
The text was updated successfully, but these errors were encountered: