fix lint errors

This commit is contained in:
2025-09-12 08:44:34 +02:00
parent f0614b09c7
commit f7bf9fe29f
3 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ async function from_file(path: string): Promise<Ok<string>> {
log.debug('Read a key from a file')
log.trace('Path :', path)
let content = await get_file_content(path)
const content = await get_file_content(path)
if (!content.ok) return content
content.data = content.data.trim()
+4 -4
View File
@@ -19,12 +19,12 @@ export async function object<S extends yup.Maybe<yup.AnyObject>>(
for (const key in schema.fields) {
const sub_key = base_name + key.toUpperCase()
const sub_scheme = schema.fields[key]
const sub_scheme = schema.fields[key] as yup.AnySchema
let value: Ok<unknown>
// TODO : If array, add a transform
if (sub_scheme.describe().type === 'object') {
value = await object(sub_scheme, sub_key)
const type = sub_scheme.describe().type
if (type === 'object') {
value = await object(sub_scheme as yup.ObjectSchema<yup.Maybe<yup.AnyObject>>, sub_key)
} else {
value = await generic(sub_scheme, sub_key)
}