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 FormatJS lint rules #245

Merged
merged 2 commits into from
Jan 29, 2023
Merged

Add FormatJS lint rules #245

merged 2 commits into from
Jan 29, 2023

Conversation

graue
Copy link
Contributor

@graue graue commented Jan 27, 2023

See: https://formatjs.io/docs/tooling/linter/

I turned on rules that seem to make sense for the default case

  • Enforce defaultMessage so stuff doesn't show up blank at first
  • Enforce description to provide context for translators
  • Let IDs be autogenerated as FormatJS recommends
  • Avoid too-complicated message variants

I didn't turn on the one banning literal strings in JSX, yet, but once every message is internationalized, we could to prevent accidentally not translating something. We would want to add exceptions for deliberately untranslated things like the BikeHopper project name.

See: https://formatjs.io/docs/tooling/linter/

I turned on rules that seem to make sense for the default case

- Enforce defaultMessage so stuff doesn't show up blank at first
- Enforce description to provide context for translators
- Let IDs be autogenerated as FormatJS recommends
- Avoid too-complicated message variants

I didn't turn on the one banning literal strings in JSX, yet, but once
every message is internationalized, we could to prevent accidentally not
translating something. We would want to add exceptions for deliberately
untranslated things like the BikeHopper project name.
@graue
Copy link
Contributor Author

graue commented Jan 27, 2023

Part of #238

@graue graue merged commit 5269d44 into main Jan 29, 2023
@graue graue deleted the graue/intl-lint branch January 29, 2023 23:37
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.

1 participant