Skip to content

Commit

Permalink
chore: resolve lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbbreuer committed Jan 18, 2025
1 parent 030c401 commit 4697267
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ export class DnsClient {
})}`, true)

// Handle retries
let lastError: Error | undefined
const maxRetries = this.options.retries || 3

for (let attempt = 0; attempt < maxRetries; attempt++) {
Expand Down Expand Up @@ -170,7 +169,6 @@ export class DnsClient {
break // Success, exit retry loop
}
catch (err) {
lastError = err as Error
debugLog('client', `Attempt ${attempt + 1} failed: ${(err as Error).message}`, true)

if (attempt === maxRetries - 1) {
Expand Down Expand Up @@ -279,7 +277,7 @@ export class DnsClient {
}

// Basic IPv4 validation
const ipv4Regex = /^(\d{1,3}\.){3}\d{1,3}$/
const ipv4Regex = /^(?:\d{1,3}\.){3}\d{1,3}$/
if (ipv4Regex.test(nameserver)) {
const parts = nameserver.split('.')
return parts.every((part) => {
Expand Down

0 comments on commit 4697267

Please sign in to comment.