api: add DOM to the list of libs for resend & fix strict offender type
Parents:
c7215bd2 file(s) changed
- api/src/utils/validators.ts +1 -1
- api/tsconfig.build.json +1 -1
api/src/utils/validators.ts
1 1
import { parseISO, isValid, isFuture, isAfter } from 'date-fns';
2 2
3 3
// Email validation
4 4
const isValidEmail = (email: string) => {
5 5
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
▸ 51 unchanged lines
57 57
}
58 58
59 59
// Validate required fields
60 60
61 61
const validateRequiredFields = (data: Record<string, unknown>, fields: string[]) => {
62 -
const missing = [];
62 +
const missing: string[] = [];
63 63
64 64
for (const field of fields) {
65 65
if (data[field] === undefined || data[field] === null || data[field] === '') {
66 66
missing.push(field);
67 67
}
▸ 19 unchanged lines
87 87
isValidPassword,
88 88
isValidDateRange,
89 89
isNotFutureDate,
90 90
isValidDate,
91 91
};
api/tsconfig.build.json
1 1
{
2 2
"extends": "./tsconfig.json",
3 3
"compilerOptions": {
4 4
"ignoreDeprecations": "6.0",
5 5
"noImplicitAny": false,
6 -
"lib": ["ES2022"]
6 +
"lib": ["ES2022", "DOM"]
7 7
},
8 8
"include": ["src/**/*"],
9 9
"exclude": ["node_modules", "dist", "tests"]
10 10
}