-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
New option: jsx-one-expression-per-line
non-jsx
#3669
Comments
I don't believe this rule quite accomplishes my use case. For example, I want this to be correct: <>Some text is: {variable} and goes here.</> but with that rule it wants to make it: <>
Some text is:
{` `}
{variable}
{` `}
and goes here.
</> I'm specifically looking to prevent the case of having multiline props but not multiline children |
If you set |
Ends up with the same result. I think the rule interprets putting in a variable as a non-literal causing it to force it to multiline. The |
ah, well sure, a variable isn't a literal. hmm, that seems like a reasonable option to add - |
jsx-one-expression-per-line
non-jsx
@ljharb happy to tackle this in coming days |
That'd be great, thanks! |
@ljharb So just to be sure I understand it correctly. The <Foo>
<Bar /><Bar /><Bar />
</Foo> <Foo>
aaa<Bar />bbb
</Foo> but allow: <Foo>
aaa {variable} bbb
</Foo> Right? |
That’s what I’m looking for |
ok, will work on this then. Hopefully will have PR ready this evening (Europe time) |
@ljharb whats the release timeline for this project? I see there haven’t been any releases since August and there are a couple of merged things I’m waiting on |
@reediculous456 there's no strict timeline, but i'll likely cut a release sooner than later. |
I hope to get #3678 in as well :) |
Examples of incorrect code for this rule:
Examples of correct code for this rule:
The text was updated successfully, but these errors were encountered: