Migrating an existing codebase, linting for strings outside of jsx #4904
Unanswered
DanDeMicco
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am looking to onboard a repo to formatjs which has a lot of hardcoded strings in it. I am using eslint-plugin-formatjs with the recommended rule set (tried strict as well), but is not catching all instances of hardcoding strings in the codebase. For example string literals or in objects defined in separate constants file
I'd like to warn and use
intl.formatMessage
. Is there any built in lint rules I am missing or can anyone share what they do here?Also, would love to know if anyone has any tips for migrating 1000's of strings over, does anyone have a codemod they would share?
Beta Was this translation helpful? Give feedback.
All reactions