@@ -123,18 +123,37 @@ This plugin is a TypeScript-focused alternative to the official [eslint-plugin-l
123123
1241243 . ** Modern ESLint** : Built for ESLint 9's flat config from the ground up.
125125
126- ### Rule Mapping
127-
128- | eslint-plugin-lingui | eslint-plugin-lingui-typescript |
129- | ---------------------| --------------------------------|
130- | ` lingui/no-unlocalized-strings ` | ` lingui-ts/no-unlocalized-strings ` |
131- | ` lingui/t-call-in-function ` | ` lingui-ts/t-call-in-function ` |
132- | ` lingui/no-single-variables-to-translate ` | ` lingui-ts/no-single-variables-to-translate ` |
133- | ` lingui/no-expression-in-message ` | ` lingui-ts/no-expression-in-message ` |
134- | ` lingui/no-single-tag-to-translate ` | ` lingui-ts/no-single-tag-to-translate ` |
135- | ` lingui/text-restrictions ` | ` lingui-ts/text-restrictions ` |
136- | ` lingui/consistent-plural-format ` | ` lingui-ts/consistent-plural-format ` |
137- | — | ` lingui-ts/no-nested-macros ` (new) |
126+ ### Rule Mapping and Options Compatibility
127+
128+ | eslint-plugin-lingui | eslint-plugin-lingui-typescript | Options |
129+ | ---------------------| --------------------------------| ---------|
130+ | ` lingui/no-unlocalized-strings ` | ` lingui-ts/no-unlocalized-strings ` | ⚠️ Different (see below) |
131+ | ` lingui/t-call-in-function ` | ` lingui-ts/t-call-in-function ` | ✅ None |
132+ | ` lingui/no-single-variables-to-translate ` | ` lingui-ts/no-single-variables-to-translate ` | ✅ None |
133+ | ` lingui/no-expression-in-message ` | ` lingui-ts/no-expression-in-message ` | ✅ None |
134+ | ` lingui/no-single-tag-to-translate ` | ` lingui-ts/no-single-tag-to-translate ` | ✅ None |
135+ | ` lingui/text-restrictions ` | ` lingui-ts/text-restrictions ` | ✅ Compatible (` rules ` ), + ` minLength ` |
136+ | ` lingui/consistent-plural-format ` | ` lingui-ts/consistent-plural-format ` | ✅ Compatible (` style ` ) |
137+ | ` lingui/no-trans-inside-trans ` | ` lingui-ts/no-nested-macros ` | ✅ Extended (all macros) |
138+
139+ ### Options Changes for ` no-unlocalized-strings `
140+
141+ The ` no-unlocalized-strings ` rule has different options because TypeScript types replace most manual configuration:
142+
143+ | Original Option | This Plugin | Notes |
144+ | -----------------| -------------| -------|
145+ | ` useTsTypes ` | — | Always enabled (TypeScript required) |
146+ | ` ignore ` (array of regex) | ` ignorePattern ` (single regex) | Simplified |
147+ | ` ignoreFunctions ` | ` ignoreFunctions ` | ✅ Compatible (wildcards work slightly differently) |
148+ | ` ignoreNames ` (with regex support) | ` ignoreNames ` | Simplified (no regex, plain strings only) |
149+ | — | ` ignoreProperties ` | New: separate option for JSX attributes and object properties |
150+ | ` ignoreMethodsOnTypes ` | — | Not needed (TypeScript handles this automatically) |
151+
152+ ** What you can remove from your config:**
153+ - ` useTsTypes: true ` — always enabled
154+ - Most ` ignoreFunctions ` entries for DOM APIs — auto-detected via types
155+ - Most ` ignoreNames ` entries for typed parameters — auto-detected via types
156+ - ` ignoreMethodsOnTypes ` — handled automatically
138157
139158### Migration Steps
140159
0 commit comments