-
Notifications
You must be signed in to change notification settings - Fork 887
(quotemark) add option to enforce double quotes in JSX attributes and single quotes elsewhere #673
Comments
is this a feature request? just to be clear, you want to enforce double quotes in HTML attributes within JSX? <MyComponent someAttr="valid" another='invalid' /> |
This is a feature request. const value = 'some text';
<input placeholder="placeholder" value={value} /> I want to enforce double quotes only in attributes within JSX. If it isn't an attribute should use single quote. |
This rule is really needed for TSX files as tslinter complains about doublequotes in TSX files. |
+1 |
1 similar comment
+1 |
Seems like a solid rule idea that is popular. I'll prioritize this! |
Just to double-check, this is just a stylistic issue right? Using single quotes for JSX attributes shouldn't cause any functional problems as far as I know: <div someProp='someValue' /> |
Hi Jason Yes you can use either single or double quotes in JSX as far as I can tell, If possible I think it might be nice to configure JSX quoting separately Cheers!
|
I'm thinking we could add two more options to the quotemark rule: |
Sounds good to me :)
|
this feature is available now in |
No description provided.
The text was updated successfully, but these errors were encountered: