Typescript v5 + eslint 8.57 WIP
This commit also improves some type handling in the project.
This commit is contained in:
@ -75,7 +75,7 @@ export async function listModFirewallFiles (
|
||||
})
|
||||
|
||||
return files.map(f => path.join(dir, f.name)).sort()
|
||||
} catch (err) {
|
||||
} catch (_err) {
|
||||
// should be that the directory does not exists
|
||||
return []
|
||||
}
|
||||
@ -148,7 +148,7 @@ export async function sanitizeModFirewallConfig (
|
||||
throw new Error('Invalid data in data.files (content)')
|
||||
}
|
||||
|
||||
if (entry.name.length > maxFirewallNameLength || !firewallNameRegexp.test(entry.name)) {
|
||||
if (entry.name.length > maxFirewallNameLength || !firewallNameRegexp.test(entry.name as string)) {
|
||||
throw new Error('Invalid name in data.files')
|
||||
}
|
||||
if (entry.content.length > maxFirewallFileSize) {
|
||||
|
Reference in New Issue
Block a user