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

Remove react/jsx-no-literals from eslint-config-faithlife #20

Open
ddunkin opened this issue Aug 25, 2021 · 2 comments
Open

Remove react/jsx-no-literals from eslint-config-faithlife #20

ddunkin opened this issue Aug 25, 2021 · 2 comments

Comments

@ddunkin
Copy link
Member

ddunkin commented Aug 25, 2021

I don't see a justification for why react/jsx-no-literals is enabled. My guess is it's to encourage developers to put strings in localizable bundles. It doesn't, though, it just encourages developers to wrap literals in {''}. Many of our projects override the rule to off. I propose we remove the rule from eslint-config-faithlife.

@randymarsh77
Copy link
Member

Not like these bugs wouldn’t be caught another way, but I have experienced this rule catching things like unintentional white space (or more rarely, other typos). More often when updating old code en masse. FWIW.

@randymarsh77
Copy link
Member

Welp, my example of this bug being caught on modern versions of this config and eslint aren't actually caught. For example, under [email protected] + [email protected], [email protected] + [email protected] and [email protected] + [email protected] we have the following failure to catch an unintended typo that also passes prettier:

Screen Shot 2021-08-26 at 10 23 06 AM

And, just to sanity check:
Screen Shot 2021-08-26 at 10 22 55 AM

And, I guess this kind of error is just a proposal

Carry on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants