Fix pre-commit script to properly handle multiple files and resolve ESLint warnings

This commit is contained in:
William Valentin
2025-09-07 13:34:39 -07:00
parent 8fa2d3fb60
commit 315303b120
33 changed files with 561 additions and 404 deletions

View File

@@ -23,14 +23,14 @@ export class MailgunService {
// Log configuration status on startup
const status = this.getConfigurationStatus();
if (status.mode === 'development') {
console.log(
console.warn(
'📧 Mailgun Service: Running in development mode (emails will be logged only)'
);
console.log(
console.warn(
'💡 To enable real emails, configure Mailgun credentials in .env.local'
);
} else {
console.log(
console.warn(
'📧 Mailgun Service: Configured for production with domain:',
status.domain
);
@@ -45,8 +45,8 @@ export class MailgunService {
<h2 style="color: #4f46e5;">Verify Your Email Address</h2>
<p>Thank you for signing up for Medication Reminder! Please click the button below to verify your email address:</p>
<div style="text-align: center; margin: 30px 0;">
<a href="${verificationUrl}"
style="background-color: #4f46e5; color: white; padding: 12px 24px; text-decoration: none; border-radius: 6px; display: inline-block;">
<a href="${verificationUrl}"
style="background-color: #4f46e5; color: white; padding: 12px 24px; text-decoration: none; border-radius: 6px; display: inline-block;">
Verify Email Address
</a>
</div>
@@ -57,10 +57,10 @@ export class MailgunService {
`,
text: `
Verify Your Email - Medication Reminder
Thank you for signing up! Please verify your email by visiting:
${verificationUrl}
This link will expire in 24 hours.
`,
};
@@ -74,8 +74,8 @@ export class MailgunService {
<h2 style="color: #4f46e5;">Reset Your Password</h2>
<p>You requested to reset your password. Click the button below to set a new password:</p>
<div style="text-align: center; margin: 30px 0;">
<a href="${resetUrl}"
style="background-color: #4f46e5; color: white; padding: 12px 24px; text-decoration: none; border-radius: 6px; display: inline-block;">
<a href="${resetUrl}"
style="background-color: #4f46e5; color: white; padding: 12px 24px; text-decoration: none; border-radius: 6px; display: inline-block;">
Reset Password
</a>
</div>
@@ -86,10 +86,10 @@ export class MailgunService {
`,
text: `
Reset Your Password - Medication Reminder
You requested to reset your password. Visit this link to set a new password:
${resetUrl}
This link will expire in 1 hour. If you didn't request this, please ignore this email.
`,
};
@@ -99,7 +99,7 @@ export class MailgunService {
try {
// In development mode or when Mailgun is not configured, just log the email
if (isDevelopmentMode()) {
console.log('📧 Mock Email Sent (Development Mode):', {
console.warn('📧 Mock Email Sent (Development Mode):', {
to,
subject: template.subject,
from: `${this.config.fromName} <${this.config.fromEmail}>`,
@@ -140,7 +140,7 @@ export class MailgunService {
}
const result = await response.json();
console.log('📧 Email sent successfully via Mailgun:', {
console.warn('📧 Email sent successfully via Mailgun:', {
to,
subject: template.subject,
messageId: result.id,