chore: enable noUncheckedIndexedAccess, better type check (#2608)

This commit is contained in:
Stephen Zhou
2025-01-18 22:35:23 +08:00
committed by GitHub
parent f947bd1d1e
commit 2cd1b5daf9
182 changed files with 489 additions and 589 deletions
+1 -1
View File
@@ -15,7 +15,7 @@ export function localesPlugin(): Plugin {
const localesDir = path.resolve(__dirname, "../../locales")
const namespaces = fs.readdirSync(localesDir).filter((dir) => dir !== ".DS_Store")
const languageResources = {}
const languageResources = {} as any
namespaces.forEach((namespace) => {
const namespacePath = path.join(localesDir, namespace)
+1 -1
View File
@@ -49,7 +49,7 @@ function calculateCompleteness(localesDir: string): LanguageCompletion {
languages.forEach((lang) => {
if (lang !== "en") {
const percent = Math.round((keyCount[lang] / enCount) * 100)
const percent = Math.round((keyCount[lang]! / enCount) * 100)
completeness[lang] = percent
}
})