Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch from single-quote in JSX to double-quotes #990

Merged
merged 1 commit into from
Jan 4, 2023

Conversation

LukasKalbertodt
Copy link
Member

This is closer to normal HTML and is also the style used in other of our projects, e.g. Tobira and the editor.

I would have loved to amend the commit that introduced the single-quotes rule, but that has already been on master for some time. So we have to live with the somewhat noisy git history here.

This is closer to normal HTML and is also the style used in other of
our projects, e.g. Tobira and the editor.

I would have loved to amend the commit that introduced the single-quotes
rule, but that has already been on master for some time. So we have to
live with the somewhat noisy git history here.
@narickmann
Copy link
Contributor

Looks good.
But only one question, why does some imports have double-quotes and the rest has single-quotes? I tested it locally (changed rule to double-quotes) and got no error for imports with single quotes.

@LukasKalbertodt
Copy link
Member Author

As this rule is only about JSX, it does not check any quotations marks anywhere else. But yes, it is a good point and might want to add another rule for other kinds of quotes. I'd like to talk in our team meetings about this.

@narickmann narickmann merged commit 0776aa7 into elan-ev:master Jan 4, 2023
@LukasKalbertodt LukasKalbertodt deleted the prefer-double-quotes branch January 4, 2023 11:10
@lkiesow
Copy link
Contributor

lkiesow commented Jan 4, 2023

This is already merged now, but why is this closer to HTML? HTML allows both single and double quotes and I often use single quotes in HTML.

@LukasKalbertodt
Copy link
Member Author

Oh really? 👀 Today I learned. Crazy.
The "consistency with other projects" argument still holds of course but yeah wow, didn't know.

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

Successfully merging this pull request may close these issues.

None yet

3 participants