netlify/eslint-config-netlify

' to "

bdougie opened this issue · 6 comments

Any chance we can switch the lint rule for single quotes. We are using double quotes in JSX but single quotes in JavaScript. We had everything default to double quotes across the board in our UI.

Any chance we can make that happen in this project?

A few things to consider:

  1. We already using this config in https://github.com/netlify/netlify-cms so it will break things there.
  2. This config is based on the eslint-config-airbnb and quite widely used across many teams.
  3. Less typing — one keypress for ' instead of ⇧+keypress for " (I know that is silly but still)

If we are considering changing this across projects, should we instead consider switching to backticks http://eslint.org/docs/rules/quotes#backticks everywhere but in JSX?

TBH, I could care less if we use ' or ", but for the sake of consistency can we do one? How about switching JSX to single?

I prefer to preserve Backticks places where we are actually using its functionality, like interpolation or multi-line strings.

Please, use double quotes everywhere.

why double quotes you might ask, because it's consistent with everything else we use.

Out of curiosity, is that the only reason?
Is there any other benefits?

@rafaelconde no, it's just a matter of preference. Okay, let's switch to " then.

Either way https://github.com/okonet/lint-staged will get you covered :)

cc @cassiozen