feat(colors): exempt templates/email/*.ninjatpl from the hardcoded-color check
Mail clients don't support CSS custom properties — themed email wrappers
(codeless WO-WZ-021) inline resolved {{ colors.* }} hex with hex
fallbacks by necessity.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
e03144e12d
commit
542324fe5c
@ -254,6 +254,13 @@ func checkNinjaTplColors(root string) []colorViolation {
|
||||
if strings.Contains(path, "/vendor/") || strings.Contains(path, "/.git/") {
|
||||
return nil
|
||||
}
|
||||
// Email wrapper templates (templates/email/*.ninjatpl) legitimately
|
||||
// require literal hex: mail clients don't support CSS custom
|
||||
// properties, so themed emails inline resolved theme colors
|
||||
// ({{ colors.* }}) with hex fallbacks (WO-WZ-021).
|
||||
if strings.Contains(filepath.ToSlash(path), "/templates/email/") {
|
||||
return nil
|
||||
}
|
||||
|
||||
relPath, _ := filepath.Rel(root, path)
|
||||
if relPath == "" {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user