[Fix] jsx-curly-brace-presence: make unwrapping single-expression template literals configurable#3608
Closed
akx wants to merge 1 commit intojsx-eslint:masterfrom
Closed
[Fix] jsx-curly-brace-presence: make unwrapping single-expression template literals configurable#3608akx wants to merge 1 commit intojsx-eslint:masterfrom
jsx-curly-brace-presence: make unwrapping single-expression template literals configurable#3608akx wants to merge 1 commit intojsx-eslint:masterfrom
Conversation
…emplate literals configurable Fixes jsx-eslint#3607
Codecov Report
@@ Coverage Diff @@
## master #3608 +/- ##
=======================================
Coverage 97.62% 97.62%
=======================================
Files 132 132
Lines 9295 9297 +2
Branches 3397 3399 +2
=======================================
+ Hits 9074 9076 +2
Misses 221 221
|
Contributor
taozhou-glean
left a comment
There was a problem hiding this comment.
lgtm, defer to owner to approve
| ```js | ||
| ... | ||
| "react/jsx-curly-brace-presence": [<enabled>, { "props": <string>, "children": <string>, "propElementValues": <string> }] | ||
| "react/jsx-curly-brace-presence": [<enabled>, { "props": <string>, "children": <string>, "propElementValues": <string>, "unwrapTemplateLiterals": <boolean> }] |
Contributor
There was a problem hiding this comment.
maybe unwrapSingleExpressionOnlyTemplateLiterals just to be more explicit ?
ljharb
requested changes
Jul 21, 2023
| ### `unwrapTemplateLiterals` | ||
|
|
||
| - `true`: unwrap template literals that only have a single expression inside of them. | ||
| Since template literals return strings, this may cause changes in semantics, or type errors. |
Member
There was a problem hiding this comment.
this makes it an unsafe autofix, which means it can't ever exist.
Contributor
Author
|
Closing in favor of the revert #3611. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #3607 (makes #3538 opt-in)
cc @taozhou-glean