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

Add eslint rules for i18next and prevent adding string literals in JSX #558

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

praneshg239
Copy link
Contributor

Adding eslint rules for i18next support. It prevents adding strings as JSX children.

image

@praneshg239 praneshg239 marked this pull request as draft December 10, 2024 18:50
Copy link

netlify bot commented Dec 10, 2024

Deploy Preview for harness-xd-review ready!

Name Link
🔨 Latest commit 4e334a8
🔍 Latest deploy log https://app.netlify.com/sites/harness-xd-review/deploys/67852c1232579f0008227ba2
😎 Deploy Preview https://deploy-preview-558--harness-xd-review.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@knagurski
Copy link
Collaborator

I think we'll need to set this as warn initially, otherwise we'll need to pull the brakes on everything until resolved. We'll also need to exclude apps/design-system from using these rules since it doesn't (yet) use i18n.

@praneshg239
Copy link
Contributor Author

I think we'll need to set this as warn initially, otherwise we'll need to pull the brakes on everything until resolved. We'll also need to exclude apps/design-system from using these rules since it doesn't (yet) use i18n.

sure @knagurski. But it would be good if we keep a deadline for making all the changes to update it as error again. Any thoughts on this?

@knagurski
Copy link
Collaborator

I think we'll need to set this as warn initially, otherwise we'll need to pull the brakes on everything until resolved. We'll also need to exclude apps/design-system from using these rules since it doesn't (yet) use i18n.

sure @knagurski. But it would be good if we keep a deadline for making all the changes to update it as error again. Any thoughts on this?

Yeah, totally agree. We should have a work stream to extract them ASAP and guard against new strings going in until such time that we can make it an error. Earlier we make it just part of the expected standard, the less work we'll have overall.

@praneshg239 praneshg239 marked this pull request as ready for review January 13, 2025 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants