Skip to content

Commit 2e3e636

Browse files
authored
Cleaned up code (#41)
1 parent 7d95a14 commit 2e3e636

File tree

4 files changed

+16
-15
lines changed

4 files changed

+16
-15
lines changed

src/eslint.config.mjs

+1
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ export default tseslint.config(
9393
// Disable type-aware linting for files outside of the project
9494
{
9595
extends: [tseslint.configs.disableTypeChecked],
96+
files: ["**/*"],
9697
ignores: ["src/**/*"],
9798
},
9899
);

src/src/lib/load-locale/utils.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export function getLocale(language: string) {
1717

1818
export async function tryImport(locale: string) {
1919
try {
20-
const imported = await import(`../../locales/${locale}.po`);
20+
const imported = (await import(`../../locales/${locale}.po`)) as unknown;
2121
return imported as { messages: Messages };
2222
} catch {
2323
return null;

src/src/locales/en.po.jinja

+12-12
Original file line numberDiff line numberDiff line change
@@ -13,45 +13,45 @@ msgstr ""
1313
"Language-Team: \n"
1414
"Plural-Forms: \n"
1515

16-
#: src/components/views/root/root-page-view/main.tsx:34
16+
#: src/components/views/root/root-page-view/main.tsx:35
1717
msgid "Click me!"
1818
msgstr "Click me!"
1919

20-
#: src/hooks/use-toasts/main.tsx:17
20+
#: src/hooks/use-toasts/main.tsx:18
2121
msgid "Error"
2222
msgstr "Error"
2323

24-
#: src/components/metadata/root/root-error-metadata/main.tsx:11
24+
#: src/components/metadata/root/root-error-metadata/main.tsx:12
2525
msgid "Error • {{ appname }}"
2626
msgstr "Error • {{ appname }}"
2727

28-
#: src/components/metadata/root/root-error-metadata/main.tsx:10
29-
#: src/components/metadata/root/root-not-found-metadata/main.tsx:10
30-
#: src/components/metadata/root/root-page-metadata/main.tsx:10
3128
#: src/components/metadata/root/root-page-metadata/main.tsx:11
29+
#: src/components/metadata/root/root-page-metadata/main.tsx:12
30+
#: src/components/metadata/root/root-not-found-metadata/main.tsx:11
31+
#: src/components/metadata/root/root-error-metadata/main.tsx:11
3232
msgid "{{ appname }}"
3333
msgstr "{{ appname }}"
3434

35-
#: src/hooks/use-toasts/main.tsx:29
35+
#: src/hooks/use-toasts/main.tsx:30
3636
msgid "Info"
3737
msgstr "Info"
3838

39-
#: src/components/metadata/root/root-not-found-metadata/main.tsx:11
39+
#: src/components/metadata/root/root-not-found-metadata/main.tsx:12
4040
msgid "Not Found • {{ appname }}"
4141
msgstr "Not Found • {{ appname }}"
4242

43-
#: src/components/views/root/root-not-found-view/main.tsx:9
43+
#: src/components/views/root/root-not-found-view/main.tsx:10
4444
msgid "Page not found"
4545
msgstr "Page not found"
4646

47-
#: src/components/views/root/root-error-view/main.tsx:9
47+
#: src/components/views/root/root-error-view/main.tsx:10
4848
msgid "Something went wrong"
4949
msgstr "Something went wrong"
5050

51-
#: src/hooks/use-toasts/main.tsx:41
51+
#: src/hooks/use-toasts/main.tsx:42
5252
msgid "Success"
5353
msgstr "Success"
5454

55-
#: src/hooks/use-toasts/main.tsx:53
55+
#: src/hooks/use-toasts/main.tsx:54
5656
msgid "Warning"
5757
msgstr "Warning"

src/tsconfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@
2121
"strict": true,
2222
"target": "esnext"
2323
},
24-
"exclude": ["node_modules"],
25-
"include": ["src/"]
24+
"exclude": ["node_modules/**/*"],
25+
"include": ["src/**/*"]
2626
}

0 commit comments

Comments
 (0)