-
Notifications
You must be signed in to change notification settings - Fork 55
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
[TECH] Feat add back translations lint #10369
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Une fois les applications déployées, elles seront accessibles via les liens suivants :
Les variables d'environnement seront accessibles via les liens suivants : |
Linting error was: "Message is Empty."
lego-technix
force-pushed
the
feat-add-back-translations-lint
branch
from
October 20, 2024 10:58
95463bb
to
3a968de
Compare
lego-technix
force-pushed
the
feat-add-back-translations-lint
branch
from
October 20, 2024 11:09
3a968de
to
f55a3eb
Compare
lionelB
approved these changes
Oct 21, 2024
matthiasferraina
approved these changes
Oct 21, 2024
aurelie-crouillebois
approved these changes
Oct 21, 2024
yannbertrand
approved these changes
Oct 21, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, un contournement ! Merci :)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
cross-team
Toutes les équipes de dev
Func Review OK
PO validated functionally the PR
🚀 Ready to Merge
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🦄 Problème
Le linting des traductions a été supprimé dans api et mon-pix avec 2 PR et car nous n'arrivions pas à utiliser le plugin ESLint avec le format flat config d'ESLint : les PR #8995 et #9847
Mais le linting des traductions est très pratique, car notamment il ordonne par tri alphabétique les traductions, ce qui diminue les conflits potentiels sur les PR.
🤖 Proposition
Remettre en place les scripts npm
lint:translations
etlint:translations:fix
de manière à ce qu'on les trouve dans tous les projets ayant des traductions.La remise en place des scripts npm
lint:translations
etlint:translations:fix
dans api et mon-pix utilise toujours https://github.com/godaddy/eslint-plugin-i18n-json mais en se basant sur la solution fournie dans godaddy/eslint-plugin-i18n-json#62 puisque eslint-plugin-i18n-json ne supporte pas de base flat config.🌈 Remarques
On pourra simplifier la configuration relative à eslint-plugin-i18n si/quand ce plugin sera de base compatible avec flat config.
💯 Pour tester
npm run lint:translations:fix
est bien fonctionnelle :2.1 Modifier par exemple le fichier
translations/fr.json
en inversant l'ordre de certaines traductions2.2 Exécuter la commande
npm run lint:translations:fix
2.3 Constater que le linter a remis les traductions dans l'ordre
2.4 Faire les mêmes opération avec un fichier généré par phrase, par exemple :
translations/fr.json
. Vérifier que les commandesnpm run lint:translations:fix
etnpm run lint:translations:fix
ignorent la modification.