chore: enable noUncheckedIndexedAccess, better type check (#2608)
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user