From 10e531d2b7f33cb6708a0bb54fdf9bd1e7848762 Mon Sep 17 00:00:00 2001 From: Andrew Scott Date: Wed, 23 Oct 2024 10:35:20 -0700 Subject: [PATCH] touchups --- .../Communication/AzureEmailService.cs | 5 +++-- .../Communication/NoOpEmailService.cs | 4 +++- .../Communication/SendGridEmailService.cs | 5 +++-- .../content/Coalesce.Starter.Vue.Web/eslint.config.mjs | 2 ++ 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/templates/Coalesce.Vue.Template/content/Coalesce.Starter.Vue.Data/Communication/AzureEmailService.cs b/templates/Coalesce.Vue.Template/content/Coalesce.Starter.Vue.Data/Communication/AzureEmailService.cs index 0a4a5e320..7d0dfee60 100644 --- a/templates/Coalesce.Vue.Template/content/Coalesce.Starter.Vue.Data/Communication/AzureEmailService.cs +++ b/templates/Coalesce.Vue.Template/content/Coalesce.Starter.Vue.Data/Communication/AzureEmailService.cs @@ -18,8 +18,9 @@ public async Task SendEmailAsync(string to, string subject, string h { if (!env.IsProduction()) { - return await new NoOpEmailService(env) - .SendEmailAsync(to, subject, htmlMessage); + logger.LogWarning("Suppressed email send of '{subject}' to {to}:\n\n{content}", + subject, to, htmlMessage); + return await new NoOpEmailService(env).SendEmailAsync(to, subject, htmlMessage); } var endpoint = config.CurrentValue.Endpoint; diff --git a/templates/Coalesce.Vue.Template/content/Coalesce.Starter.Vue.Data/Communication/NoOpEmailService.cs b/templates/Coalesce.Vue.Template/content/Coalesce.Starter.Vue.Data/Communication/NoOpEmailService.cs index e11e1555a..5c0c7e649 100644 --- a/templates/Coalesce.Vue.Template/content/Coalesce.Starter.Vue.Data/Communication/NoOpEmailService.cs +++ b/templates/Coalesce.Vue.Template/content/Coalesce.Starter.Vue.Data/Communication/NoOpEmailService.cs @@ -2,7 +2,9 @@ namespace Coalesce.Starter.Vue.Data.Communication; -public class NoOpEmailService(IHostEnvironment env) : IEmailService +public class NoOpEmailService( + IHostEnvironment env +) : IEmailService { public Task SendEmailAsync(string to, string subject, string htmlMessage) { diff --git a/templates/Coalesce.Vue.Template/content/Coalesce.Starter.Vue.Data/Communication/SendGridEmailService.cs b/templates/Coalesce.Vue.Template/content/Coalesce.Starter.Vue.Data/Communication/SendGridEmailService.cs index 68d8db69a..f0ad017c4 100644 --- a/templates/Coalesce.Vue.Template/content/Coalesce.Starter.Vue.Data/Communication/SendGridEmailService.cs +++ b/templates/Coalesce.Vue.Template/content/Coalesce.Starter.Vue.Data/Communication/SendGridEmailService.cs @@ -23,8 +23,9 @@ public async Task SendEmailAsync(string to, string subject, string h { if (!env.IsProduction()) { - return await new NoOpEmailService(env) - .SendEmailAsync(to, subject, htmlMessage); + logger.LogWarning("Suppressed email send of '{subject}' to {to}:\n\n{content}", + subject, to, htmlMessage); + return await new NoOpEmailService(env).SendEmailAsync(to, subject, htmlMessage); } var apiKey = config.CurrentValue.ApiKey; diff --git a/templates/Coalesce.Vue.Template/content/Coalesce.Starter.Vue.Web/eslint.config.mjs b/templates/Coalesce.Vue.Template/content/Coalesce.Starter.Vue.Web/eslint.config.mjs index 62adf251e..ad520c822 100644 --- a/templates/Coalesce.Vue.Template/content/Coalesce.Starter.Vue.Web/eslint.config.mjs +++ b/templates/Coalesce.Vue.Template/content/Coalesce.Starter.Vue.Web/eslint.config.mjs @@ -29,7 +29,9 @@ export default [ endOfLine: "auto", }, ], + "vue/multi-word-component-names": "off", + "vue/no-template-shadow": ["error", { allow: ["props"] }], "prefer-const": "error", "no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",