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-no-literals: properly error on children with noAttributeStrings: true #3317

Merged
merged 1 commit into from
Jul 2, 2022

Conversation

TildaDares
Copy link
Contributor

@TildaDares TildaDares commented Jul 1, 2022

Fixes #3171

@TildaDares
Copy link
Contributor Author

@ljharb Please review!

@codecov
Copy link

codecov bot commented Jul 1, 2022

Codecov Report

Merging #3317 (9f5f96f) into master (aac7fb9) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head 9f5f96f differs from pull request most recent head 7a7bb99. Consider uploading reports for the commit 7a7bb99 to get more accurate results

@@           Coverage Diff           @@
##           master    #3317   +/-   ##
=======================================
  Coverage   97.70%   97.70%           
=======================================
  Files         123      123           
  Lines        8764     8766    +2     
  Branches     3176     3178    +2     
=======================================
+ Hits         8563     8565    +2     
  Misses        201      201           
Impacted Files Coverage Δ
lib/rules/jsx-no-literals.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aac7fb9...7a7bb99. Read the comment docs.

Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

lib/rules/jsx-no-literals.js Outdated Show resolved Hide resolved
tests/lib/rules/jsx-no-literals.js Outdated Show resolved Hide resolved
@TildaDares
Copy link
Contributor Author

TildaDares commented Jul 1, 2022

@ljharb I’ve made changes as requested.

@ljharb
Copy link
Member

ljharb commented Jul 2, 2022

Looks like some of the new test cases are expecting the wrong error message?

@ljharb ljharb marked this pull request as draft July 2, 2022 03:55
@TildaDares TildaDares marked this pull request as ready for review July 2, 2022 06:26
@TildaDares
Copy link
Contributor Author

@ljharb It's ready for review now. I was just missing >= sign in the condition for checking arguments length.

@ljharb ljharb changed the title Fixed jsx-no-literals bug [Fix] jsx-no-literals: properly error on children with noAttributeStrings: true Jul 2, 2022
@ljharb ljharb merged commit 7a7bb99 into jsx-eslint:master Jul 2, 2022
@TildaDares TildaDares deleted the fix-jsx-no-literals-bug branch July 3, 2022 16:39
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-no-literals]: no errors for children when noAttributeStrings: true
2 participants