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

[Fix] jsx-curly-brace-presence: handle single and only expression template literals #3538

Merged
merged 1 commit into from
Feb 25, 2023

Conversation

taozhou-glean
Copy link
Contributor

fix #3537

@codecov
Copy link

codecov bot commented Feb 25, 2023

Codecov Report

Merging #3538 (099b14c) into master (8f24366) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #3538   +/-   ##
=======================================
  Coverage   97.60%   97.60%           
=======================================
  Files         132      132           
  Lines        9275     9282    +7     
  Branches     3389     3392    +3     
=======================================
+ Hits         9053     9060    +7     
  Misses        222      222           
Impacted Files Coverage Δ
lib/rules/jsx-curly-brace-presence.js 98.11% <100.00%> (+0.06%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@ljharb ljharb changed the title [jsx-curly-brace-presence] handle single and only expression template literals [Fix] jsx-curly-brace-presence: handle single and only expression template literals Feb 25, 2023
@ljharb ljharb merged commit 099b14c into jsx-eslint:master Feb 25, 2023
@Newbie012
Copy link

Newbie012 commented Jul 23, 2023

Hi @ljharb, I believe this change is wrong. This is a valid use case for stringifying a primitive (e.g., from number to string). Although you could do it via String(var) or var.toString(), using prop={`${number}`} is a valid use case as well.

If you insist on keeping it as it is, I suggest putting it behind a flag 🙏.

@taozhou-glean
Copy link
Contributor Author

let me revert this now

@ljharb
Copy link
Member

ljharb commented Jul 23, 2023

@Newbie012 yes, you're right, it should be reverted.

ljharb pushed a commit to taozhou-glean/eslint-plugin-react that referenced this pull request Jul 23, 2023
ljharb pushed a commit to taozhou-glean/eslint-plugin-react that referenced this pull request Jul 24, 2023
ljharb pushed a commit to taozhou-glean/eslint-plugin-react that referenced this pull request Jul 24, 2023
caesar1030 pushed a commit to caesar1030/eslint-plugin-react that referenced this pull request Dec 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

[jsx-curly-brace-presence] template literals contains just expressions
3 participants