Tslint: Add option to quotemark rule to disallow all quotes

Created on 1 Aug 2015  路  6Comments  路  Source: palantir/tslint

A valid coding style would be to only use template strings for all strings.

Ideas for the rule option name:

  • none
  • backtick
P2 Accepting PRs Rule Suggestion

Most helpful comment

Keen to see this! I want to use backticks everywhere instead of single/double quotes. https://ponyfoo.com/articles/template-literals-strictly-better-strings

All 6 comments

the corresponding option in eslint is called "backtick": http://eslint.org/docs/rules/quotes

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?

Looks like #4029 fixed this! 馃帀

Was this page helpful?
0 / 5 - 0 ratings