Add ESLint rule to enforce Lingui msg usage

Adds a custom ESLint rule 'lingui-msg-rule' that ensures the Lingui _()
function is called with msg`` template literals or plural/select macros,
preventing accidental misuse like _('string') which bypasses i18n.

https://claude.ai/code/session_01JMXXPUgAHiSBGmfGwUojKy
This commit is contained in:
Claude
2026-01-28 22:33:28 +00:00
committed by Samuel Newman
parent 31553f0d40
commit 6817b990a8
4 changed files with 214 additions and 0 deletions
+1
View File
@@ -9,6 +9,7 @@ const plugin = {
'avoid-unwrapped-text': require('./avoid-unwrapped-text'),
'use-exact-imports': require('./use-exact-imports'),
'use-prefixed-imports': require('./use-prefixed-imports'),
'lingui-msg-rule': require('./lingui-msg-rule'),
},
}