question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

quotes rule support for backtick/backquote option

See original GitHub issue

Hi guys, in ES6 it’s legal to use apostrophes for strings (template strings):

let a = `string`;

Is it a bad idea to use it generally in the code instead of single and double quotes? If not, could the quotes rule support this as an option?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:16 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
doberkoflercommented, Apr 11, 2015

@zaggino If I get this right, this option would allow to (for example) specify that all strings must be backticks and I’m not sure if this is what people really want. I would imagine that the use of backticks would be additional (when needed) to the use of single or double quotes and not exclusive.

0reactions
granteagoncommented, Jul 25, 2016

@mysticatea, got it. What I was trying to do was:

className={ `Icon ${ prop.icon.className }` }

Got my syntax confused. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

quotes - ESLint - Pluggable JavaScript Linter
This rule enforces the consistent use of either backticks, double, or single quotes. Options. This rule has two options, a string option and...
Read more >
“Double Quotes” vs 'Single Quotes' vs `Backticks` in JavaScript
Although single quotes and double quotes are the most popular, we have a 3rd option called Backticks ( `` ). Backticks are an...
Read more >
quotes | typescript-eslint
This rule extends the base eslint/quotes rule. It adds support for TypeScript features which allow quoted names, but not backtick quoted names.
Read more >
When to use single quotes, double quotes, and backticks in ...
Back-ticks are never used in standard SQL. (If you need to include a double quote in an identifier, type it twice as "odd""tablename"...
Read more >
Use Backticks For All Your JS Strings | Rémi de Juvigny
The standard approach among developers has been to keep using single or double quotes for most of our strings. And if we need...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found