@intlayer/docs 9.3.2 → 9.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/blog/ar/nextjs-multilingual-seo-comparison.md +10 -10
  2. package/blog/de/nextjs-multilingual-seo-comparison.md +9 -9
  3. package/blog/en/nextjs-multilingual-seo-comparison.md +10 -10
  4. package/blog/en-GB/nextjs-multilingual-seo-comparison.md +10 -10
  5. package/blog/es/nextjs-multilingual-seo-comparison.md +10 -10
  6. package/blog/fr/nextjs-multilingual-seo-comparison.md +10 -10
  7. package/blog/hi/nextjs-multilingual-seo-comparison.md +10 -10
  8. package/blog/id/nextjs-multilingual-seo-comparison.md +10 -10
  9. package/blog/it/nextjs-multilingual-seo-comparison.md +10 -10
  10. package/blog/ja/nextjs-multilingual-seo-comparison.md +9 -9
  11. package/blog/ko/nextjs-multilingual-seo-comparison.md +9 -9
  12. package/blog/pl/nextjs-multilingual-seo-comparison.md +10 -10
  13. package/blog/pt/nextjs-multilingual-seo-comparison.md +9 -9
  14. package/blog/ru/nextjs-multilingual-seo-comparison.md +9 -9
  15. package/blog/tr/nextjs-multilingual-seo-comparison.md +9 -9
  16. package/blog/uk/nextjs-multilingual-seo-comparison.md +10 -10
  17. package/blog/vi/nextjs-multilingual-seo-comparison.md +10 -10
  18. package/blog/zh/nextjs-multilingual-seo-comparison.md +10 -10
  19. package/docs/ar/bundle_optimization.md +1 -1
  20. package/docs/ar/configuration.md +32 -9
  21. package/docs/ar/dictionary/content_file.md +0 -22
  22. package/docs/ar/dictionary/function_fetching.md +23 -0
  23. package/docs/ar/eslint.md +9 -9
  24. package/docs/bn/configuration.md +34 -9
  25. package/docs/bn/eslint.md +9 -9
  26. package/docs/cs/bundle_optimization.md +1 -1
  27. package/docs/cs/configuration.md +33 -9
  28. package/docs/cs/eslint.md +9 -9
  29. package/docs/de/bundle_optimization.md +1 -1
  30. package/docs/de/configuration.md +34 -9
  31. package/docs/de/dictionary/content_file.md +0 -22
  32. package/docs/de/dictionary/function_fetching.md +23 -0
  33. package/docs/de/eslint.md +9 -9
  34. package/docs/en/bundle_optimization.md +1 -1
  35. package/docs/en/configuration.md +34 -9
  36. package/docs/en/dictionary/content_file.md +0 -22
  37. package/docs/en/dictionary/function_fetching.md +23 -0
  38. package/docs/en/eslint.md +9 -9
  39. package/docs/en/packages/intlayer/getLocalizedPath.md +70 -19
  40. package/docs/en-GB/configuration.md +33 -9
  41. package/docs/en-GB/dictionary/content_file.md +0 -22
  42. package/docs/en-GB/dictionary/function_fetching.md +23 -0
  43. package/docs/en-GB/eslint.md +9 -9
  44. package/docs/es/bundle_optimization.md +1 -1
  45. package/docs/es/configuration.md +35 -9
  46. package/docs/es/dictionary/content_file.md +0 -22
  47. package/docs/es/dictionary/function_fetching.md +23 -0
  48. package/docs/es/eslint.md +9 -9
  49. package/docs/fr/bundle_optimization.md +1 -1
  50. package/docs/fr/configuration.md +35 -9
  51. package/docs/fr/dictionary/content_file.md +0 -22
  52. package/docs/fr/dictionary/function_fetching.md +23 -0
  53. package/docs/fr/eslint.md +9 -9
  54. package/docs/hi/configuration.md +35 -9
  55. package/docs/hi/dictionary/content_file.md +0 -22
  56. package/docs/hi/dictionary/function_fetching.md +23 -0
  57. package/docs/hi/eslint.md +9 -9
  58. package/docs/id/configuration.md +35 -9
  59. package/docs/id/dictionary/content_file.md +0 -22
  60. package/docs/id/dictionary/function_fetching.md +23 -0
  61. package/docs/id/eslint.md +9 -9
  62. package/docs/it/bundle_optimization.md +1 -1
  63. package/docs/it/configuration.md +35 -9
  64. package/docs/it/dictionary/content_file.md +0 -22
  65. package/docs/it/dictionary/function_fetching.md +23 -0
  66. package/docs/it/eslint.md +9 -9
  67. package/docs/ja/configuration.md +30 -9
  68. package/docs/ja/dictionary/content_file.md +0 -22
  69. package/docs/ja/dictionary/function_fetching.md +23 -0
  70. package/docs/ja/eslint.md +9 -9
  71. package/docs/ko/configuration.md +31 -9
  72. package/docs/ko/dictionary/content_file.md +0 -22
  73. package/docs/ko/dictionary/function_fetching.md +23 -0
  74. package/docs/ko/eslint.md +9 -9
  75. package/docs/nl/configuration.md +33 -9
  76. package/docs/nl/eslint.md +9 -9
  77. package/docs/pl/bundle_optimization.md +1 -1
  78. package/docs/pl/configuration.md +34 -9
  79. package/docs/pl/dictionary/content_file.md +0 -22
  80. package/docs/pl/dictionary/function_fetching.md +23 -0
  81. package/docs/pl/eslint.md +9 -9
  82. package/docs/pt/bundle_optimization.md +1 -1
  83. package/docs/pt/configuration.md +34 -9
  84. package/docs/pt/dictionary/content_file.md +0 -22
  85. package/docs/pt/dictionary/function_fetching.md +23 -0
  86. package/docs/pt/eslint.md +9 -9
  87. package/docs/ru/bundle_optimization.md +1 -1
  88. package/docs/ru/configuration.md +34 -9
  89. package/docs/ru/dictionary/content_file.md +0 -22
  90. package/docs/ru/dictionary/function_fetching.md +23 -0
  91. package/docs/ru/eslint.md +9 -9
  92. package/docs/tr/bundle_optimization.md +1 -1
  93. package/docs/tr/configuration.md +33 -9
  94. package/docs/tr/dictionary/content_file.md +0 -22
  95. package/docs/tr/dictionary/function_fetching.md +23 -0
  96. package/docs/tr/eslint.md +9 -9
  97. package/docs/uk/configuration.md +35 -9
  98. package/docs/uk/dictionary/content_file.md +0 -22
  99. package/docs/uk/dictionary/function_fetching.md +23 -0
  100. package/docs/uk/eslint.md +9 -9
  101. package/docs/ur/configuration.md +35 -9
  102. package/docs/ur/eslint.md +9 -9
  103. package/docs/vi/bundle_optimization.md +1 -1
  104. package/docs/vi/configuration.md +33 -9
  105. package/docs/vi/dictionary/content_file.md +0 -22
  106. package/docs/vi/dictionary/function_fetching.md +23 -0
  107. package/docs/vi/eslint.md +9 -9
  108. package/docs/zh/bundle_optimization.md +1 -1
  109. package/docs/zh/configuration.md +29 -9
  110. package/docs/zh/dictionary/content_file.md +0 -22
  111. package/docs/zh/dictionary/function_fetching.md +23 -0
  112. package/docs/zh/eslint.md +9 -9
  113. package/docs/zh-TW/bundle_optimization.md +1 -1
  114. package/docs/zh-TW/eslint.md +9 -9
  115. package/package.json +5 -5
@@ -478,6 +478,28 @@ const config: IntlayerConfig = {
478
478
  */
479
479
  purge: true,
480
480
 
481
+ /**
482
+ * Seskupit chunky slovníků podle jazyka na základě hranice dělení kódu, která
483
+ * je používá, aby líně načtená stránka získala svůj obsah jedním požadavkem.
484
+ * Výchozí: true
485
+ *
486
+ * Poznámka:
487
+ * - Platí pouze pro slovníky používající `importMode: 'dynamic'`.
488
+ */
489
+ chunkGrouping: true,
490
+
491
+ /**
492
+ * Načíst slovník společně s chunkem, který jej používá, místo jeho stažení až
493
+ * po vykreslení daného chunku. Čtení se vykreslí synchronně místo pozastavení,
494
+ * takže navigace už neproblikne stavem načítání.
495
+ * Výchozí: true
496
+ *
497
+ * Poznámka:
498
+ * - Čeká se pouze na vyhodnocený jazyk, stránka tedy stahuje jen jazyk, který
499
+ * zobrazuje.
500
+ */
501
+ dictionariesPreload: true,
502
+
481
503
  /**
482
504
  * Výstupní formát pro generované soubory slovníku.
483
505
  * Výchozí: ['cjs', 'esm']
@@ -1039,15 +1061,17 @@ Volby sestavení se aplikují na pluginy `@intlayer/babel` a `@intlayer/swc`.
1039
1061
 
1040
1062
  > Během optimalizace Intlayer nahradí volání slovníků pro optimalizaci dělení kódu (chunking), aby výsledný balíček importoval pouze ty slovníky, které se skutečně používají.
1041
1063
 
1042
- | Pole | Popis | Typ | Výchozí | Příklad | Poznámka |
1043
- | ----------------- | -------------------------------------------------------------------- | -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1044
- | `mode` | Ovládá režim sestavení. | `'auto'` &#124; <br/> `'manual'` | `'auto'` | `'manual'` | • `'auto'`: sestavení se spustí automaticky během sestavení aplikace.<br/>• `'manual'`: provede se pouze při explicitním volání příkazu sestavení.<br/>• Lze použít k vypnutí sestavení slovníků (např. pro zamezení běhu v prostředích Node.js). |
1045
- | `optimize` | Ovládá, zda se má provádět optimalizace sestavení. | `boolean` | `undefined` | `process.env.NODE_ENV === 'production'` | • Pokud není definováno, optimalizace se spustí při sestavení frameworku (Vite/Next.js).<br/>• `true` vynutí optimalizaci i v dev režimu.<br/>• `false` ji vypne.<br/>• Pokud je zapnuto, nahradí volání slovníků pro optimalizaci chunkingu.<br/>• Vyžaduje pluginy `@intlayer/babel` a `@intlayer/swc`. |
1046
- | `minify` | Minifikujte slovníky pro snížení velikosti balíčku. | `boolean` | `false` | | • Určuje, zda má být balíček minifikován.<br/>• Výchozí: `true` v produkci.<br/>• Tato volba bude ignorována, pokud je `optimize` zakázáno.<br/>• Tato volba bude ignorována, pokud je `editor.enabled` true. |
1047
- | `purge` | Odstraňte nepoužívané klíče ve slovnících. | `boolean` | `false` | | • Určuje, zda má být balíček vyčištěn.<br/>• Výchozí: `true` v produkci.<br/>• Tato volba bude ignorována, pokud je `optimize` zakázáno. |
1048
- | `checkTypes` | Udává, zda má sestavení kontrolovat typy TypeScript a logovat chyby. | `boolean` | `false` | | Může zpomalit proces sestavení. |
1049
- | `outputFormat` | Ovládá výstupní formát slovníků. | `('esm' &#124; 'cjs')[]` | `['esm', 'cjs']` | `['cjs']` | |
1050
- | `traversePattern` | Vzory definující, které soubory skenovat během optimalizace. | `string[]` | `['**/*.{tsx,ts,js,mjs,cjs,jsx,vue,svelte,svte}', '!**/node_modules/**', '!**/dist/**', '!**/.intlayer/**', '!**/*.config.*', '!**/*.test.*', '!**/*.spec.*', '!**/*.stories.*']` | `['src/**/*.{ts,tsx}', '../ui-library/**/*.{ts,tsx}', '!**/node_modules/**']` | Omezte optimalizaci na relevantní soubory pro zvýšení výkonu sestavení.<br/>• Ignorovalo by se, kdyby byl `optimize` vypnutý.<br/>• Používá vzory glob. |
1064
+ | Pole | Popis | Typ | Výchozí | Příklad | Poznámka |
1065
+ | --------------------- | ---------------------------------------------------------------------------------------------------------------------- | -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1066
+ | `mode` | Ovládá režim sestavení. | `'auto'` &#124; <br/> `'manual'` | `'auto'` | `'manual'` | • `'auto'`: sestavení se spustí automaticky během sestavení aplikace.<br/>• `'manual'`: provede se pouze při explicitním volání příkazu sestavení.<br/>• Lze použít k vypnutí sestavení slovníků (např. pro zamezení běhu v prostředích Node.js). |
1067
+ | `optimize` | Ovládá, zda se má provádět optimalizace sestavení. | `boolean` | `undefined` | `process.env.NODE_ENV === 'production'` | • Pokud není definováno, optimalizace se spustí při sestavení frameworku (Vite/Next.js).<br/>• `true` vynutí optimalizaci i v dev režimu.<br/>• `false` ji vypne.<br/>• Pokud je zapnuto, nahradí volání slovníků pro optimalizaci chunkingu.<br/>• Vyžaduje pluginy `@intlayer/babel` a `@intlayer/swc`. |
1068
+ | `minify` | Minifikujte slovníky pro snížení velikosti balíčku. | `boolean` | `false` | | • Určuje, zda má být balíček minifikován.<br/>• Výchozí: `true` v produkci.<br/>• Tato volba bude ignorována, pokud je `optimize` zakázáno.<br/>• Tato volba bude ignorována, pokud je `editor.enabled` true. |
1069
+ | `purge` | Odstraňte nepoužívané klíče ve slovnících. | `boolean` | `false` | | • Určuje, zda má být balíček vyčištěn.<br/>• Výchozí: `true` v produkci.<br/>• Tato volba bude ignorována, pokud je `optimize` zakázáno. |
1070
+ | `checkTypes` | Udává, zda má sestavení kontrolovat typy TypeScript a logovat chyby. | `boolean` | `false` | | Může zpomalit proces sestavení. |
1071
+ | `chunkGrouping` | Určuje, zda se mají chunky slovníků podle jazyka seskupovat podle hranice dělení kódu, která je používá. | `boolean` | `true` | | • Bez seskupení vyšle stránka složená z mnoha komponent jeden požadavek na každý slovník.<br/>• Slovníky dosažitelné z více hranic se přesunou do sdíleného chunku, takže žádná stránka nenese obsah jiné stránky.<br/>• Platí pouze pro slovníky používající `importMode: 'dynamic'`.<br/>• Platí pouze pro klientský build a jen při bundlování (ne ve vývojovém režimu). |
1072
+ | `dictionariesPreload` | Určuje, zda se slovník načítat společně s chunkem, který jej používá, místo stažení až po vykreslení daného chunku. | `boolean` | `true` | | Vygenerovaný vstupní bod čeká na jazyk prohlížení na nejvyšší úrovni, takže líně načtená trasa není považována za načtenou, dokud není k dispozici její obsah.<br/>• Čtení se vykreslí synchronně místo pozastavení, takže navigace už neproblikne stavem načítání.<br/>• Čeká se pouze na vyhodnocený jazyk, stránka tedy stahuje jen jazyk, který zobrazuje.<br/>• Platí pouze pro slovníky používající `importMode: 'dynamic'` v klientském buildu.<br/>• Vyžaduje bundler s podporou top-level await (Vite, esbuild). |
1073
+ | `outputFormat` | Ovládá výstupní formát slovníků. | `('esm' &#124; 'cjs')[]` | `['esm', 'cjs']` | `['cjs']` | |
1074
+ | `traversePattern` | Vzory definující, které soubory skenovat během optimalizace. | `string[]` | `['**/*.{tsx,ts,js,mjs,cjs,jsx,vue,svelte,svte}', '!**/node_modules/**', '!**/dist/**', '!**/.intlayer/**', '!**/*.config.*', '!**/*.test.*', '!**/*.spec.*', '!**/*.stories.*']` | `['src/**/*.{ts,tsx}', '../ui-library/**/*.{ts,tsx}', '!**/node_modules/**']` | • Omezte optimalizaci na relevantní soubory pro zvýšení výkonu sestavení.<br/>• Ignorovalo by se, kdyby byl `optimize` vypnutý.<br/>• Používá vzory glob. |
1051
1075
 
1052
1076
  ---
1053
1077
 
package/docs/cs/eslint.md CHANGED
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  createdAt: 2026-08-12
3
- updatedAt: 2026-08-12
3
+ updatedAt: 2026-08-13
4
4
  title: Plugin ESLint | Pravidla lintování pro Intlayer
5
5
  description: Odhalujte natvrdo zapsané řetězce, dynamická volání, která kompilátor Intlayer nedokáže optimalizovat, a nepoužitý obsah slovníků pomocí eslint-plugin-intlayer. Funguje s ESLint a oxlint v Reactu, Vue, Svelte, Angularu a Astru.
6
6
  keywords:
@@ -52,7 +52,7 @@ pnpm add --save-dev eslint-plugin-intlayer
52
52
  yarn add --dev eslint-plugin-intlayer
53
53
  ```
54
54
 
55
- Vyžaduje ESLint 9 nebo novější (flat config).
55
+ Vyžaduje ESLint 9 nebo novější (flat config). ESLint 10 je podporován.
56
56
 
57
57
  ## Použití
58
58
 
@@ -61,20 +61,20 @@ Plugin funguje jak v ESLint, tak v [oxlint](https://oxc.rs) — se stejnými pra
61
61
  <Tabs defaultTab="eslint">
62
62
  <Tab label="ESLint" value="eslint">
63
63
 
64
- ```javascript fileName="eslint.config.mjs" codeFormat="esm"
64
+ ```javascript fileName="eslint.config.mjs"
65
65
  import intlayer from "eslint-plugin-intlayer";
66
66
 
67
67
  export default [...intlayer.configs.recommended];
68
68
  ```
69
69
 
70
- Nebo aktivujte pravidla jednotlivě:
70
+ Nebo rozbalte konfiguraci a závažnosti si nastavte sami:
71
71
 
72
- ```javascript fileName="eslint.config.mjs" codeFormat="esm"
72
+ ```javascript fileName="eslint.config.mjs"
73
73
  import intlayer from "eslint-plugin-intlayer";
74
74
 
75
75
  export default [
76
+ ...intlayer.configs.recommended,
76
77
  {
77
- plugins: { intlayer },
78
78
  rules: {
79
79
  "intlayer/no-raw-text": "warn",
80
80
  "intlayer/static-dictionary-key": "error",
@@ -144,7 +144,7 @@ Chcete-li opravit celý soubor najednou, spusťte `npx intlayer extract` a necht
144
144
 
145
145
  **Možnosti**
146
146
 
147
- ```javascript fileName="eslint.config.mjs" codeFormat="esm"
147
+ ```javascript fileName="eslint.config.mjs"
148
148
  {
149
149
  "intlayer/no-raw-text": [
150
150
  "warn",
@@ -247,7 +247,7 @@ Na rozdíl od jiných pravidel toto pravidlo nemůže rozhodnout pouze na zákla
247
247
 
248
248
  **Možnosti**
249
249
 
250
- ```javascript fileName="eslint.config.mjs" codeFormat="esm"
250
+ ```javascript fileName="eslint.config.mjs"
251
251
  {
252
252
  "intlayer/no-unused-content": [
253
253
  "warn",
@@ -296,7 +296,7 @@ Každé pravidlo funguje ve všech integracích Intlayer, včetně šablon Vue,
296
296
  | Šablony Angularu | `.component.html` | `@angular-eslint/template-parser` |
297
297
  | Astro | `.astro` | `astro-eslint-parser` |
298
298
 
299
- ```javascript fileName="eslint.config.mjs" codeFormat="esm"
299
+ ```javascript fileName="eslint.config.mjs"
300
300
  import intlayer from "eslint-plugin-intlayer";
301
301
  import tseslint from "typescript-eslint";
302
302
  import vueParser from "vue-eslint-parser";
@@ -159,7 +159,7 @@ pnpm add -D webpack-bundle-analyzer
159
159
  bun add -d webpack-bundle-analyzer
160
160
  ```
161
161
 
162
- ```typescript fileName="webpack.config.ts
162
+ ```typescript fileName="webpack.config.ts"
163
163
  import { BundleAnalyzerPlugin } from "webpack-bundle-analyzer";
164
164
 
165
165
  export default {
@@ -478,6 +478,29 @@ const config: IntlayerConfig = {
478
478
  */
479
479
  purge: true,
480
480
 
481
+ /**
482
+ * Die locale-spezifischen Wörterbuch-Chunks nach der Code-Splitting-Grenze
483
+ * gruppieren, die sie verwendet, damit eine verzögert geladene Seite ihren
484
+ * Inhalt in einer Anfrage abruft.
485
+ * Standard: true
486
+ *
487
+ * Hinweis:
488
+ * - Gilt nur für Wörterbücher mit `importMode: 'dynamic'`.
489
+ */
490
+ chunkGrouping: true,
491
+
492
+ /**
493
+ * Ein Wörterbuch zusammen mit dem Chunk laden, der es verwendet, statt es
494
+ * abzurufen, sobald dieser Chunk rendert. Leser rendern synchron statt zu
495
+ * suspendieren, sodass beim Navigieren kein Ladezustand mehr aufblitzt.
496
+ * Standard: true
497
+ *
498
+ * Hinweis:
499
+ * - Es wird nur die aufgelöste Locale abgewartet, die Seite lädt also
500
+ * weiterhin nur die Sprache, die sie darstellt.
501
+ */
502
+ dictionariesPreload: true,
503
+
481
504
  /**
482
505
  * Ausgabeformat für generierte Wörterbuchdateien.
483
506
  * Standard: ['cjs', 'esm']
@@ -1057,15 +1080,17 @@ Die Build-Optionen gelten für die Plugins `@intlayer/babel` und `@intlayer/swc`
1057
1080
 
1058
1081
  > Bei der Optimierung ersetzt Intlayer Wörterbuch-Aufrufe, um das Chunking zu optimieren, sodass das finale Bundle nur die tatsächlich verwendeten Wörterbücher importiert.
1059
1082
 
1060
- | Feld | Beschreibung | Typ | Standard | Beispiel | Hinweis |
1061
- | ----------------- | ----------------------------------------------------------------------------------------- | -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1062
- | `mode` | Steuert den Build-Modus. | `'auto'` &#124; <br/> `'manual'` | `'auto'` | `'manual'` | • `'auto'`: Build wird automatisch während des App-Builds ausgelöst.<br/>• `'manual'`: Wird nur ausgeführt, wenn der Build-Befehl explizit aufgerufen wird.<br/>• Kann verwendet werden, um Wörterbuch-Builds zu deaktivieren (z. B. um die Ausführung in Node.js-Umgebungen zu vermeiden). |
1063
- | `optimize` | Steuert, ob der Build optimiert werden soll. | `boolean` | `undefined` | `process.env.NODE_ENV === 'production'` | • Wenn nicht definiert, wird die Optimierung beim Build des Frameworks (Vite/Next.js) ausgelöst.<br/>• `true` erzwingt die Optimierung auch im Dev-Modus.<br/>• `false` deaktiviert sie.<br/>• Wenn aktiv, ersetzt es Wörterbuch-Aufrufe zur Chunking-Optimierung.<br/>• Erfordert `@intlayer/babel` und `@intlayer/swc` Plugins. |
1064
- | `minify` | Dictionarien minimieren, um die Bundle-Größe zu reduzieren. | `boolean` | `false` | | • Gibt an, ob das Bundle minimiert werden soll.<br/>• Standard: `true` in Produktion.<br/>• Diese Option wird ignoriert, wenn `optimize` deaktiviert ist.<br/>• Diese Option wird ignoriert, wenn `editor.enabled` auf true gesetzt ist. |
1065
- | `purge` | Nicht verwendete Schlüssel in Dictionarien entfernen. | `boolean` | `false` | | • Gibt an, ob das Bundle bereinigt werden soll.<br/>• Standard: `true` in Produktion.<br/>• Diese Option wird ignoriert, wenn `optimize` deaktiviert ist. |
1066
- | `checkTypes` | Gibt an, ob der Build TypeScript-Typen prüfen und Fehler protokollieren soll. | `boolean` | `false` | | Kann den Build-Prozess verlangsamen. |
1067
- | `outputFormat` | Steuert das Ausgabeformat der Wörterbücher. | `('esm' &#124; 'cjs')[]` | `['esm', 'cjs']` | `['cjs']` | |
1068
- | `traversePattern` | Muster, die definieren, welche Dateien während der Optimierung durchlaufen werden sollen. | `string[]` | `['**/*.{tsx,ts,js,mjs,cjs,jsx,vue,svelte,svte}', '!**/node_modules/**', '!**/dist/**', '!**/.intlayer/**', '!**/*.config.*', '!**/*.test.*', '!**/*.spec.*', '!**/*.stories.*']` | `['src/**/*.{ts,tsx}', '../ui-library/**/*.{ts,tsx}', '!**/node_modules/**']` | Begrenzen Sie die Optimierung auf relevante Dateien, um die Build-Leistung zu verbessern.<br/>• Wird ignoriert, wenn `optimize` deaktiviert ist.<br/>• Verwendet Glob-Muster. |
1083
+ | Feld | Beschreibung | Typ | Standard | Beispiel | Hinweis |
1084
+ | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1085
+ | `mode` | Steuert den Build-Modus. | `'auto'` &#124; <br/> `'manual'` | `'auto'` | `'manual'` | • `'auto'`: Build wird automatisch während des App-Builds ausgelöst.<br/>• `'manual'`: Wird nur ausgeführt, wenn der Build-Befehl explizit aufgerufen wird.<br/>• Kann verwendet werden, um Wörterbuch-Builds zu deaktivieren (z. B. um die Ausführung in Node.js-Umgebungen zu vermeiden). |
1086
+ | `optimize` | Steuert, ob der Build optimiert werden soll. | `boolean` | `undefined` | `process.env.NODE_ENV === 'production'` | • Wenn nicht definiert, wird die Optimierung beim Build des Frameworks (Vite/Next.js) ausgelöst.<br/>• `true` erzwingt die Optimierung auch im Dev-Modus.<br/>• `false` deaktiviert sie.<br/>• Wenn aktiv, ersetzt es Wörterbuch-Aufrufe zur Chunking-Optimierung.<br/>• Erfordert `@intlayer/babel` und `@intlayer/swc` Plugins. |
1087
+ | `minify` | Dictionarien minimieren, um die Bundle-Größe zu reduzieren. | `boolean` | `false` | | • Gibt an, ob das Bundle minimiert werden soll.<br/>• Standard: `true` in Produktion.<br/>• Diese Option wird ignoriert, wenn `optimize` deaktiviert ist.<br/>• Diese Option wird ignoriert, wenn `editor.enabled` auf true gesetzt ist. |
1088
+ | `purge` | Nicht verwendete Schlüssel in Dictionarien entfernen. | `boolean` | `false` | | • Gibt an, ob das Bundle bereinigt werden soll.<br/>• Standard: `true` in Produktion.<br/>• Diese Option wird ignoriert, wenn `optimize` deaktiviert ist. |
1089
+ | `checkTypes` | Gibt an, ob der Build TypeScript-Typen prüfen und Fehler protokollieren soll. | `boolean` | `false` | | Kann den Build-Prozess verlangsamen. |
1090
+ | `chunkGrouping` | Gibt an, ob die locale-spezifischen Wörterbuch-Chunks nach der Code-Splitting-Grenze gruppiert werden sollen, die sie verwendet. | `boolean` | `true` | | • Ohne Gruppierung stellt eine aus vielen Komponenten zusammengesetzte Seite eine Anfrage pro Wörterbuch.<br/>• Wörterbücher, die von mehreren Grenzen erreicht werden, wandern in einen gemeinsamen Chunk, sodass keine Seite den Inhalt einer anderen ausliefert.<br/>• Gilt nur für Wörterbücher mit `importMode: 'dynamic'`.<br/>• Gilt nur für den Client-Build und nur beim Bundling (nicht im Dev-Modus). |
1091
+ | `dictionariesPreload` | Gibt an, ob ein Wörterbuch zusammen mit dem Chunk geladen werden soll, der es verwendet, statt abgerufen zu werden, sobald dieser Chunk rendert. | `boolean` | `true` | | Der generierte Einstiegspunkt wartet die Browsing-Locale auf oberster Ebene ab, sodass eine verzögert geladene Route erst als geladen gilt, wenn ihr Inhalt vorliegt.<br/>• Leser rendern synchron statt zu suspendieren, sodass beim Navigieren kein Ladezustand mehr aufblitzt.<br/>• Es wird nur die aufgelöste Locale abgewartet, die Seite lädt also nur die Sprache, die sie darstellt.<br/>• Gilt nur für Wörterbücher mit `importMode: 'dynamic'` im Client-Build.<br/>• Erfordert einen Bundler mit Unterstützung für Top-Level-Await (Vite, esbuild). |
1092
+ | `outputFormat` | Steuert das Ausgabeformat der Wörterbücher. | `('esm' &#124; 'cjs')[]` | `['esm', 'cjs']` | `['cjs']` | |
1093
+ | `traversePattern` | Muster, die definieren, welche Dateien während der Optimierung durchlaufen werden sollen. | `string[]` | `['**/*.{tsx,ts,js,mjs,cjs,jsx,vue,svelte,svte}', '!**/node_modules/**', '!**/dist/**', '!**/.intlayer/**', '!**/*.config.*', '!**/*.test.*', '!**/*.spec.*', '!**/*.stories.*']` | `['src/**/*.{ts,tsx}', '../ui-library/**/*.{ts,tsx}', '!**/node_modules/**']` | • Begrenzen Sie die Optimierung auf relevante Dateien, um die Build-Leistung zu verbessern.<br/>• Wird ignoriert, wenn `optimize` deaktiviert ist.<br/>• Verwendet Glob-Muster. |
1069
1094
 
1070
1095
  ---
1071
1096
 
@@ -536,28 +536,6 @@ Dieses Feld wird in Verbindung mit Varianten verwendet und definiert benannte In
536
536
 
537
537
  > Siehe [Varianten](https://github.com/aymericzip/intlayer/blob/main/docs/docs/de/dynamic_dictionaries/variants.md) für weitere Informationen.
538
538
 
539
- #### `meta` (`Record<string, string | number | boolean>`)
540
-
541
- Dieses Feld wird in Verbindung mit dynamischen Datensätzen (Dynamic Records) verwendet und ermöglicht die Deklaration von CMS-verwalteten Datensätzen oder beliebigen Daten, die zur Laufzeit über eine opake ID abgerufen werden. Die Wörterbuchidentität wird durch die beliebige Menge von Schlüssel-Wert-Paaren definiert, die in diesem `meta`-Feld deklariert sind.
542
-
543
- **Beispiel:**
544
-
545
- ```typescript
546
- {
547
- key: "product-copy",
548
- meta: {
549
- id: "prod_abc",
550
- userId: "user_123"
551
- },
552
- content: {
553
- name: "Widget Pro",
554
- description: "The best widget."
555
- }
556
- }
557
- ```
558
-
559
- > Siehe [Dynamische Datensätze](https://github.com/aymericzip/intlayer/blob/main/docs/docs/de/dynamic_dictionaries/dynamic_content.md) für weitere Informationen.
560
-
561
539
  ### CMS-Eigenschaften
562
540
 
563
541
  ##### `version` (string)
@@ -89,6 +89,29 @@ Es ist nicht möglich, Inhalte aus einer JSON-Datei abzurufen, verwenden Sie sta
89
89
 
90
90
  In diesem Fall simuliert die Funktion `fakeFetch` eine Verzögerung, um die Serverantwortzeit nachzuahmen. Intlayer führt die asynchrone Funktion aus und verwendet das Ergebnis als Inhalt für den Schlüssel `text`.
91
91
 
92
+ ## Remote-Inhalte abrufen
93
+
94
+ Sie können einem Inhaltsfeld auch direkt ein Promise zuweisen. Intlayer wartet es beim Erstellen der Wörterbücher ab und fügt den aufgelösten Wert ein:
95
+
96
+ ```typescript fileName="**/*.content.ts" contentDeclarationFormat={["typescript", "esm", "commonjs"]}
97
+ import type { Dictionary } from "intlayer";
98
+
99
+ const remoteContent = {
100
+ key: "remote_content",
101
+ content: {
102
+ externalContent: fetch("https://example.com").then((res) => res.json()),
103
+ },
104
+ } satisfies Dictionary;
105
+
106
+ export default remoteContent;
107
+ ```
108
+
109
+ ```plaintext fileName="**/*.content.json" contentDeclarationFormat="json"
110
+ Es ist nicht möglich, Inhalte aus einer JSON-Datei abzurufen, verwenden Sie stattdessen eine .ts- oder .js-Datei
111
+ ```
112
+
113
+ > Die Anfrage wird zur Build-Zeit ausgeführt, die abgerufenen Daten sind also eine im Wörterbuch eingebettete Momentaufnahme. Erstellen Sie Ihre Wörterbücher neu, um sie zu aktualisieren.
114
+
92
115
  ## Verwendung von funktionsbasierten Inhalten in React-Komponenten
93
116
 
94
117
  Um funktionsbasierte Inhalte in einer React-Komponente zu verwenden, müssen Sie `useIntlayer` aus `react-intlayer` importieren und mit der Inhalts-ID aufrufen, um den Inhalt abzurufen. Hier ist ein Beispiel:
package/docs/de/eslint.md CHANGED
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  createdAt: 2026-08-12
3
- updatedAt: 2026-08-12
3
+ updatedAt: 2026-08-13
4
4
  title: ESLint Plugin | Linting-Regeln für Intlayer
5
5
  description: Erkennen Sie hartcodierte Zeichenketten, dynamische Aufrufe, die der Intlayer-Compiler nicht optimieren kann, und ungenutzte Wörterbuchinhalte mit eslint-plugin-intlayer. Funktioniert mit ESLint und oxlint für React, Vue, Svelte, Angular und Astro.
6
6
  keywords:
@@ -52,7 +52,7 @@ pnpm add --save-dev eslint-plugin-intlayer
52
52
  yarn add --dev eslint-plugin-intlayer
53
53
  ```
54
54
 
55
- Erfordert ESLint 9 oder höher (Flat Config).
55
+ Erfordert ESLint 9 oder höher (Flat Config). ESLint 10 wird unterstützt.
56
56
 
57
57
  ## Verwendung
58
58
 
@@ -61,20 +61,20 @@ Das Plugin funktioniert sowohl in ESLint als auch in [oxlint](https://oxc.rs)
61
61
  <Tabs defaultTab="eslint">
62
62
  <Tab label="ESLint" value="eslint">
63
63
 
64
- ```javascript fileName="eslint.config.mjs" codeFormat="esm"
64
+ ```javascript fileName="eslint.config.mjs"
65
65
  import intlayer from "eslint-plugin-intlayer";
66
66
 
67
67
  export default [...intlayer.configs.recommended];
68
68
  ```
69
69
 
70
- Oder aktivieren Sie Regeln einzeln:
70
+ Oder fügen Sie eine Konfiguration ein und legen die Schweregrade selbst fest:
71
71
 
72
- ```javascript fileName="eslint.config.mjs" codeFormat="esm"
72
+ ```javascript fileName="eslint.config.mjs"
73
73
  import intlayer from "eslint-plugin-intlayer";
74
74
 
75
75
  export default [
76
+ ...intlayer.configs.recommended,
76
77
  {
77
- plugins: { intlayer },
78
78
  rules: {
79
79
  "intlayer/no-raw-text": "warn",
80
80
  "intlayer/static-dictionary-key": "error",
@@ -144,7 +144,7 @@ Um eine Datei vollständig auf einmal zu korrigieren, führen Sie `npx intlayer
144
144
 
145
145
  **Optionen**
146
146
 
147
- ```javascript fileName="eslint.config.mjs" codeFormat="esm"
147
+ ```javascript fileName="eslint.config.mjs"
148
148
  {
149
149
  "intlayer/no-raw-text": [
150
150
  "warn",
@@ -247,7 +247,7 @@ Im Gegensatz zu den anderen Regeln kann diese Regel nicht allein anhand der gepr
247
247
 
248
248
  **Optionen**
249
249
 
250
- ```javascript fileName="eslint.config.mjs" codeFormat="esm"
250
+ ```javascript fileName="eslint.config.mjs"
251
251
  {
252
252
  "intlayer/no-unused-content": [
253
253
  "warn",
@@ -296,7 +296,7 @@ Jede Regel funktioniert über alle Intlayer-Integrationen hinweg, einschließlic
296
296
  | Angular-Templates | `.component.html` | `@angular-eslint/template-parser` |
297
297
  | Astro | `.astro` | `astro-eslint-parser` |
298
298
 
299
- ```javascript fileName="eslint.config.mjs" codeFormat="esm"
299
+ ```javascript fileName="eslint.config.mjs"
300
300
  import intlayer from "eslint-plugin-intlayer";
301
301
  import tseslint from "typescript-eslint";
302
302
  import vueParser from "vue-eslint-parser";
@@ -159,7 +159,7 @@ pnpm add -D webpack-bundle-analyzer
159
159
  bun add -d webpack-bundle-analyzer
160
160
  ```
161
161
 
162
- ```typescript fileName="webpack.config.ts
162
+ ```typescript fileName="webpack.config.ts"
163
163
  import { BundleAnalyzerPlugin } from "webpack-bundle-analyzer";
164
164
 
165
165
  export default {
@@ -482,6 +482,29 @@ const config: IntlayerConfig = {
482
482
  */
483
483
  purge: false,
484
484
 
485
+ /**
486
+ * Group the per-locale dictionary chunks by the code-split boundary that uses
487
+ * them, so a lazily loaded page fetches its content in one request.
488
+ * Default: true
489
+ *
490
+ * Note:
491
+ * - Only applies to dictionaries using `importMode: 'dynamic'`.
492
+ */
493
+ chunkGrouping: true,
494
+
495
+ /**
496
+ * Load a dictionary together with the chunk that uses it, instead of fetching
497
+ * it once that chunk renders. Readers render synchronously instead of
498
+ * suspending, so navigating no longer flashes a loading state.
499
+ * Default: true
500
+ *
501
+ * Note:
502
+ * - Only applies to dictionaries using `importMode: 'dynamic'`.
503
+ * - Only the resolved locale is awaited, so a page still downloads only the
504
+ * language it renders.
505
+ */
506
+ dictionariesPreload: true,
507
+
485
508
  /**
486
509
  * Output format for generated dictionary files.
487
510
  * Default: ['cjs', 'esm']
@@ -1062,15 +1085,17 @@ Build options apply to the `@intlayer/babel` and `@intlayer/swc` plugins.
1062
1085
 
1063
1086
  > When optimized, Intlayer will replace dictionary calls to optimize chunking, so the final bundle only imports dictionaries that are actually used.
1064
1087
 
1065
- | Field | Description | Type | Default | Example | Note |
1066
- | ----------------- | -------------------------------------------------------------------- | -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1067
- | `mode` | Controls the mode of the build. | `'auto'` &#124; <br/> `'manual'` | `'auto'` | `'manual'` | • `'auto'`: build enabled automatically when the application is built.<br/>• `'manual'`: only runs when the build command is executed.<br/>• Can be used to disable dictionary builds (e.g. to avoid running in Node.js environments). |
1068
- | `optimize` | Controls whether the build should be optimized. | `boolean` | `undefined` | `process.env.NODE_ENV === 'production'` | • If unset, optimization is triggered on framework build (Vite/Next.js).<br/>• `true` forces optimization including dev mode.<br/>• `false` disables it.<br/>• When enabled, replaces dictionary calls to optimize chunking - only used dictionaries are imported.<br/>• Relies on `@intlayer/babel` and `@intlayer/swc` plugins.<br/>• Keys must be declared statically. |
1069
- | `minify` | Whether to minify the dictionaries to reduce the bundle size. | `boolean` | `false` | | • Indicates whether the bundle should be minified.<br/>• Default: `false`.<br/>• This option will be ignored if `optimize` is disabled.<br/>• This option will be ignored if `editor.enabled` is true. |
1070
- | `purge` | Whether to purge the unused keys in a dictionaries. | `boolean` | `false` | | • Indicates whether the bundle should be purged.<br/>• Default: `false`.<br/>• This option will be ignored if `optimize` is disabled. |
1071
- | `checkTypes` | Indicates if the build should check TypeScript types and log errors. | `boolean` | `false` | | Can slow down the build. |
1072
- | `outputFormat` | Controls the output format of the dictionaries. | `('esm' &#124; 'cjs')[]` | `['esm', 'cjs']` | `['cjs']` | |
1073
- | `traversePattern` | Patterns defining which files to traverse during optimization. | `string[]` | `['**/*.{tsx,ts,js,mjs,cjs,jsx,vue,svelte,svte}', '!**/node_modules/**', '!**/dist/**', '!**/.intlayer/**', '!**/*.config.*', '!**/*.test.*', '!**/*.spec.*', '!**/*.stories.*']` | `['src/**/*.{ts,tsx}', '../ui-library/**/*.{ts,tsx}', '!**/node_modules/**']` | Limit optimization to relevant files to improve build performance.<br/>• Ignored if `optimize` is disabled.<br/>• Uses glob pattern. |
1088
+ | Field | Description | Type | Default | Example | Note |
1089
+ | --------------------- | ------------------------------------------------------------------------------------------------------------------------ | -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1090
+ | `mode` | Controls the mode of the build. | `'auto'` &#124; <br/> `'manual'` | `'auto'` | `'manual'` | • `'auto'`: build enabled automatically when the application is built.<br/>• `'manual'`: only runs when the build command is executed.<br/>• Can be used to disable dictionary builds (e.g. to avoid running in Node.js environments). |
1091
+ | `optimize` | Controls whether the build should be optimized. | `boolean` | `undefined` | `process.env.NODE_ENV === 'production'` | • If unset, optimization is triggered on framework build (Vite/Next.js).<br/>• `true` forces optimization including dev mode.<br/>• `false` disables it.<br/>• When enabled, replaces dictionary calls to optimize chunking - only used dictionaries are imported.<br/>• Relies on `@intlayer/babel` and `@intlayer/swc` plugins.<br/>• Keys must be declared statically. |
1092
+ | `minify` | Whether to minify the dictionaries to reduce the bundle size. | `boolean` | `false` | | • Indicates whether the bundle should be minified.<br/>• Default: `false`.<br/>• This option will be ignored if `optimize` is disabled.<br/>• This option will be ignored if `editor.enabled` is true. |
1093
+ | `purge` | Whether to purge the unused keys in a dictionaries. | `boolean` | `false` | | • Indicates whether the bundle should be purged.<br/>• Default: `false`.<br/>• This option will be ignored if `optimize` is disabled. |
1094
+ | `checkTypes` | Indicates if the build should check TypeScript types and log errors. | `boolean` | `false` | | Can slow down the build. |
1095
+ | `chunkGrouping` | Whether to group the per-locale dictionary chunks by the code-split boundary that uses them. | `boolean` | `true` | | • Without grouping, a page assembled from many components issues one request per dictionary.<br/>• Dictionaries reached from several boundaries move to a shared chunk, so no page ships another page's content.<br/>• Only applies to dictionaries using `importMode: 'dynamic'`.<br/>• Only applies to the client build, and only when bundling (not in dev). |
1096
+ | `dictionariesPreload` | Whether a dictionary should load together with the chunk that uses it, instead of being fetched once that chunk renders. | `boolean` | `true` | | The generated entry point requests the browsing locale as it evaluates, so the request leaves with the chunk that needs it instead of once that chunk renders.<br/>• Readers usually render synchronously instead of suspending, so navigating no longer flashes a loading state.<br/>• Only the resolved locale is requested, so a page still downloads only the language it renders.<br/>• Only applies to dictionaries using `importMode: 'dynamic'`, on the client build.<br/>• Not applied by Metro-based bundlers. |
1097
+ | `outputFormat` | Controls the output format of the dictionaries. | `('esm' &#124; 'cjs')[]` | `['esm', 'cjs']` | `['cjs']` | |
1098
+ | `traversePattern` | Patterns defining which files to traverse during optimization. | `string[]` | `['**/*.{tsx,ts,js,mjs,cjs,jsx,vue,svelte,svte}', '!**/node_modules/**', '!**/dist/**', '!**/.intlayer/**', '!**/*.config.*', '!**/*.test.*', '!**/*.spec.*', '!**/*.stories.*']` | `['src/**/*.{ts,tsx}', '../ui-library/**/*.{ts,tsx}', '!**/node_modules/**']` | • Limit optimization to relevant files to improve build performance.<br/>• Ignored if `optimize` is disabled.<br/>• Uses glob pattern. |
1074
1099
 
1075
1100
  ---
1076
1101
 
@@ -539,28 +539,6 @@ Used in conjunction with [Variants](https://github.com/aymericzip/intlayer/blob/
539
539
 
540
540
  > See [Variants](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/dynamic_dictionaries/variants.md) for more information.
541
541
 
542
- #### `meta` (`Record<string, string | number | boolean>`)
543
-
544
- Used in conjunction with Dynamic Records, this field allows declaring CMS-managed records or arbitrary data fetched at runtime by an opaque ID. The dictionary identity is defined by the arbitrary set of key-value pairs declared in this `meta` field.
545
-
546
- **Example:**
547
-
548
- ```typescript
549
- {
550
- key: "product-copy",
551
- meta: {
552
- id: "prod_abc",
553
- userId: "user_123"
554
- },
555
- content: {
556
- name: "Widget Pro",
557
- description: "The best widget."
558
- }
559
- }
560
- ```
561
-
562
- > See [Dynamic Records](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/dynamic_dictionaries/dynamic_content.md) for more information.
563
-
564
542
  ### CMS Properties
565
543
 
566
544
  ##### `version` (string)
@@ -89,6 +89,29 @@ No way to fetch content from a JSON file, use a .ts or .js file instead
89
89
 
90
90
  In this case, the `fakeFetch` function mimics a delay to simulate server response time. Intlayer executes the asynchronous function and uses the result as the content for the `text` key.
91
91
 
92
+ ## Fetching Remote Content
93
+
94
+ You can also assign a promise directly to a content field. Intlayer awaits it while building the dictionaries and inlines the resolved value:
95
+
96
+ ```typescript fileName="**/*.content.ts" contentDeclarationFormat={["typescript", "esm", "commonjs"]}
97
+ import type { Dictionary } from "intlayer";
98
+
99
+ const remoteContent = {
100
+ key: "remote_content",
101
+ content: {
102
+ externalContent: fetch("https://example.com").then((res) => res.json()),
103
+ },
104
+ } satisfies Dictionary;
105
+
106
+ export default remoteContent;
107
+ ```
108
+
109
+ ```plaintext fileName="**/*.content.json" contentDeclarationFormat="json"
110
+ No way to fetch content from a JSON file, use a .ts or .js file instead
111
+ ```
112
+
113
+ > The request runs at build time, so the fetched data is a snapshot embedded in the dictionary. Rebuild your dictionaries to refresh it.
114
+
92
115
  ## Using Function-Based Content in React Components
93
116
 
94
117
  To use function-based content in a React component, you need to import `useIntlayer` from `react-intlayer` and call it with the content ID to retrieve the content. Here's an example:
package/docs/en/eslint.md CHANGED
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  createdAt: 2026-08-12
3
- updatedAt: 2026-08-12
3
+ updatedAt: 2026-08-13
4
4
  title: ESLint Plugin | Lint rules for Intlayer
5
5
  description: Catch hardcoded strings, dynamic calls the Intlayer compiler cannot optimize, and unused dictionary content, with eslint-plugin-intlayer. Works with ESLint and oxlint, across React, Vue, Svelte, Angular and Astro.
6
6
  keywords:
@@ -52,7 +52,7 @@ pnpm add --save-dev eslint-plugin-intlayer
52
52
  yarn add --dev eslint-plugin-intlayer
53
53
  ```
54
54
 
55
- Requires ESLint 9 or later (flat config).
55
+ Requires ESLint 9 or later (flat config). ESLint 10 is supported.
56
56
 
57
57
  ## Usage
58
58
 
@@ -61,20 +61,20 @@ The plugin runs in both ESLint and [oxlint](https://oxc.rs) — the same rules,
61
61
  <Tabs defaultTab="eslint">
62
62
  <Tab label="ESLint" value="eslint">
63
63
 
64
- ```javascript fileName="eslint.config.mjs" codeFormat="esm"
64
+ ```javascript fileName="eslint.config.mjs"
65
65
  import intlayer from "eslint-plugin-intlayer";
66
66
 
67
67
  export default [...intlayer.configs.recommended];
68
68
  ```
69
69
 
70
- Or enable rules one by one:
70
+ Or spread a config and set the severities yourself:
71
71
 
72
- ```javascript fileName="eslint.config.mjs" codeFormat="esm"
72
+ ```javascript fileName="eslint.config.mjs"
73
73
  import intlayer from "eslint-plugin-intlayer";
74
74
 
75
75
  export default [
76
+ ...intlayer.configs.recommended,
76
77
  {
77
- plugins: { intlayer },
78
78
  rules: {
79
79
  "intlayer/no-raw-text": "warn",
80
80
  "intlayer/static-dictionary-key": "error",
@@ -144,7 +144,7 @@ To fix a whole file at once, run `npx intlayer extract` and let the compiler mov
144
144
 
145
145
  **Options**
146
146
 
147
- ```javascript fileName="eslint.config.mjs" codeFormat="esm"
147
+ ```javascript fileName="eslint.config.mjs"
148
148
  {
149
149
  "intlayer/no-raw-text": [
150
150
  "warn",
@@ -247,7 +247,7 @@ Unlike the other rules, this one cannot answer from the file in front of it —
247
247
 
248
248
  **Options**
249
249
 
250
- ```javascript fileName="eslint.config.mjs" codeFormat="esm"
250
+ ```javascript fileName="eslint.config.mjs"
251
251
  {
252
252
  "intlayer/no-unused-content": [
253
253
  "warn",
@@ -296,7 +296,7 @@ Every rule works across all Intlayer integrations, including inside Vue, Svelte
296
296
  | Angular templates | `.component.html` | `@angular-eslint/template-parser` |
297
297
  | Astro | `.astro` | `astro-eslint-parser` |
298
298
 
299
- ```javascript fileName="eslint.config.mjs" codeFormat="esm"
299
+ ```javascript fileName="eslint.config.mjs"
300
300
  import intlayer from "eslint-plugin-intlayer";
301
301
  import tseslint from "typescript-eslint";
302
302
  import vueParser from "vue-eslint-parser";