1

Does it really matter anymore using ' instead of "? I keep running into this issue with linters.

Airbnb likes to use ', where as prettier is fine with ".

Comments?

Calvin Nunes
  • 6,376
  • 4
  • 20
  • 48
z.a.
  • 2,549
  • 3
  • 12
  • 16
  • What do you mean by "really matter"? Aside from personal preference or less-characters-to-type (in case you have to escape " or ' you can just use the other of the two, or simply use `... so the answer would be: No it does not matter. – Jonathan Oct 19 '18 at 11:12
  • 4
    ES6 has made literally no changes to this – Liam Oct 19 '18 at 11:12
  • Linters can check for consistency, so you can indeed enable only using one or the other quote to make sure everything is uniform accross the project. But you can also disable that. Similarly, you can mandate no spaces around `=` or only having space on the right side, etc. It's just code style related. With that, similar to @Liam I'm a bit confused why you mention ES6 - you even say "Does it really matter **anymore**" - what do you think has changed around quotes since...well, the inception of JS? – VLAZ Oct 19 '18 at 11:20
  • And try to use the right quotes in texts.....‘’ instead of '' and “” instead of "". Then there will be no collision. – Matthi Oct 19 '18 at 11:50
  • It's personal preference, but what really matters is **consistency**, use whatever you want. For me, I prefer `'` over the other, just because it's one keystroke in an english keyboard, for `"` I have to press `shift+'` which is an extra effort for no extra reward. – Alvaro Castro Oct 19 '18 at 17:35

0 Answers0