Mixing spaces and tabs, extra semicolons and lonely ifs are now forbidden

This commit is contained in:
BB
2022-03-11 16:32:48 +01:00
parent 372776c94e
commit 5e2ccc71ec
16 changed files with 47 additions and 85 deletions
+1 -3
View File
@@ -17,8 +17,7 @@ export function validateObject<Type extends Record<string, unknown>, Key extends
if (paramValidator !== undefined) {
if (typeof paramValidator === 'function') {
paramValidator(obj, key);
} else {
if (paramValidator.func !== undefined) {
} else if (paramValidator.func !== undefined) {
paramValidator.func(obj, validator, key);
} else {
if ((typeof obj[key]) !== (typeof paramValidator.default)) {
@@ -31,7 +30,6 @@ export function validateObject<Type extends Record<string, unknown>, Key extends
if (obj[key] > paramValidator.max) obj[key] = paramValidator.max as Type[Key];
}
}
}
}
}
}