Skip to content
This repository has been archived by the owner on Jun 28, 2021. It is now read-only.

What's the preferred quote style? #44

Closed
faergeek opened this issue Sep 21, 2015 · 8 comments
Closed

What's the preferred quote style? #44

faergeek opened this issue Sep 21, 2015 · 8 comments

Comments

@faergeek
Copy link
Contributor

From eslint-plugin-react docs

It takes an option as the second parameter which can be "double" or "single" for double-quotes or single-quotes respectively. There is no default.

So what's the preferred style?
I'm asking because that rule is deprecated and should be replaced by native eslint option.

@tleunen
Copy link
Owner

tleunen commented Sep 21, 2015

I usually use single quotes in JS but double quotes in html (and therefore JSX).

The default value is "double" so it should be ok.

@tleunen tleunen closed this as completed Sep 21, 2015
@faergeek
Copy link
Contributor Author

No, it's not double, try to set double explicitly and lint sources.

@faergeek
Copy link
Contributor Author

I can submit PR for that too :-)

@tleunen
Copy link
Owner

tleunen commented Sep 21, 2015

It's actually prefer-double ;)

@faergeek
Copy link
Contributor Author

In native, yes.

@tleunen
Copy link
Owner

tleunen commented Sep 21, 2015

Do you mean we don't inherit from it because it's not part of the recommended eslint configuration?

@faergeek
Copy link
Contributor Author

I mean that in eslint-plugin-react there was no default value for that option, so I assume that rule didn't ever work.
But for native eslint option there's default value prefer-double.

@tleunen
Copy link
Owner

tleunen commented Sep 21, 2015

Indeed we never used the rule from eslint-plugin-react. I didn't know it existed. Probably it has been added after I integrated it.
About the recommended eslint, we're using it then.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants