ghostfolio/ghostfolio

Enable strictTemplates for the client app

Aberta

#7.393 aberto em 22 de jul. de 2026

 (3 comentários) (0 reação) (0 responsável)TypeScript (1.234 forks)auto 404
Angularenhancementhelp wanted

Métricas do repositório

Stars
 (8.983 estrelas)
Métricas de merge de PR
 (Métricas PR pendentes)

Description

The apps/client project has Angular's strict template checking currently disabled in apps/client/tsconfig.json:

"angularCompilerOptions": {
  "strictInjectionParameters": true,
  // TODO: Enable stricter rules for this project
  "strictInputAccessModifiers": false,
  "strictTemplates": false
}

libs/ui already runs with strictTemplates: true, so the client is the last project holding this back. Enabling it catches template type errors (nullability, mismatched input types, misspelled bindings) at build time.

Scope

A trial run flipping both flags surfaces ~420 template type errors across ~54 components, whilte the majority is nullability-driven (strictNullChecks is already on but not yet enforced in templates), plus a handful of genuine bugs (bindings to properties that don't exist). Note that libs/ui template errors also surface here, since its strict setting is only enforced when the client compiles it.

Suggested approach (4 phases, to keep PRs reviewable)

  1. Fix the genuine bugs surfaced (missing / misspelled bindings)
  2. Clean up libs/ui template errors
  3. Fix apps/client nullability errors, batched by page/component
  4. Flip strictTemplates + strictInputAccessModifiers to true and remove the TODO

Guia do colaborador