Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

When formatting JSX single quotes option is ignored. #94

Closed
gustavnikolaj opened this issue Mar 20, 2017 · 1 comment
Closed

When formatting JSX single quotes option is ignored. #94

gustavnikolaj opened this issue Mar 20, 2017 · 1 comment
Labels

Comments

@gustavnikolaj
Copy link

I am evaluating the tool on an existing code base. By coincidence, prettier matches the existing style except that it prefers single quotes and uses 4 spaces. So I changed those options in the editor plugin.

With settings Single Quotes enabled and Tab Width set to 4, the following code is changed from:

function SomeComponent() {
    return <div className='foo'>Hello World</div>
}

Into:

function SomeComponent() {
    return <div className="foo">Hello World</div>
}
 function SomeComponent() {
-    return <div className='foo'>Hello World</div>
+    return <div className="foo">Hello World</div>;
 }
@gustavnikolaj
Copy link
Author

Turns out this is by design prettier/prettier#126

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

No branches or pull requests

2 participants