Skip to content

Commit cf8ce9e

Browse files
properly ignore i18n files
1 parent bd939f9 commit cf8ce9e

6 files changed

Lines changed: 1313 additions & 1349 deletions

File tree

web/biome.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
{
22
"$schema": "https://biomejs.dev/schemas/2.1.2/schema.json",
33
"vcs": { "enabled": false, "clientKind": "git", "useIgnoreFile": false },
4-
"files": { "ignoreUnknown": false },
4+
"files": {
5+
"ignoreUnknown": false,
6+
"includes": ["src/**", "!src/i18n/*.ts", "!src/i18n/*.tsx", "!src/i18n/i18n-util"]
7+
},
58
"formatter": {
69
"enabled": true,
710
"formatWithErrors": false,

web/src/i18n/i18n-react.tsx

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,16 @@
11
// This file was auto-generated by 'typesafe-i18n'. Any manual changes will be overwritten.
22
/* eslint-disable */
33

4-
import { useContext } from 'react';
5-
import type { I18nContextType } from 'typesafe-i18n/react';
6-
import { initI18nReact } from 'typesafe-i18n/react';
7-
import type {
8-
Formatters,
9-
Locales,
10-
TranslationFunctions,
11-
Translations,
12-
} from './i18n-types';
13-
import { loadedFormatters, loadedLocales } from './i18n-util';
4+
import { useContext } from 'react'
5+
import { initI18nReact } from 'typesafe-i18n/react'
6+
import type { I18nContextType } from 'typesafe-i18n/react'
7+
import type { Formatters, Locales, TranslationFunctions, Translations } from './i18n-types'
8+
import { loadedFormatters, loadedLocales } from './i18n-util'
149

15-
const { component: TypesafeI18n, context: I18nContext } = initI18nReact<
16-
Locales,
17-
Translations,
18-
TranslationFunctions,
19-
Formatters
20-
>(loadedLocales, loadedFormatters);
10+
const { component: TypesafeI18n, context: I18nContext } = initI18nReact<Locales, Translations, TranslationFunctions, Formatters>(loadedLocales, loadedFormatters)
2111

22-
const useI18nContext = (): I18nContextType<Locales, Translations, TranslationFunctions> =>
23-
useContext(I18nContext);
12+
const useI18nContext = (): I18nContextType<Locales, Translations, TranslationFunctions> => useContext(I18nContext)
2413

25-
export { I18nContext, useI18nContext };
14+
export { I18nContext, useI18nContext }
2615

27-
export default TypesafeI18n;
16+
export default TypesafeI18n

0 commit comments

Comments
 (0)