Reference
Presets.
ngcompass:recommended and layer additional presets as needed.Usage
01import { defineConfig } from '@ngcompass/config';02
03export default defineConfig({04 // Single preset:05 // extends: 'ngcompass:recommended',06
07 // Or layer multiple presets. Later entries win.08 extends: ['ngcompass:recommended', 'ngcompass:ssr'],09});Built-in presets
ngcompass:recommendedrecommended15 rulesHigh-confidence rules that prevent real bugs and regressions in any Angular project. Designed for teams at any modernization stage.
Includescorrectness, RxJS memory safety, change detection, template performance, security, and focused-test checks
ngcompass:strict27 rulesAll built-in rules at error severity. Zero-tolerance mode for CI and teams that want every architectural, performance, migration, SSR, security, and testing violation enforced.
Includesall 27 rules at error severity
ngcompass:performance8 rulesRules that directly impact Angular rendering and change-detection performance.
IncludesOnPush, manual detectChanges(), template calls, trackBy, object/array literal bindings, async pipe duplication, and toSignal template-state guidance
ngcompass:reactivity13 rulesSignals correctness and RxJS-to-Signals migration rules for Angular 17+ projects.
IncludesRxJS subscription safety, Subject overuse, toSignal migration, signal purity, effect scoping, untracked usage, and modern signal I/O APIs
ngcompass:security2 rulesXSS and sanitization bypass prevention rules. Useful as a standalone security-audit layer or on top of a custom base config.
IncludesDomSanitizer bypass and unsafe template binding checks
ngcompass:ssr2 rulesPlatform safety rules for Angular SSR and Universal applications.
Includesbrowser-global access and DOM work in lifecycle hooks that can break server rendering or hydration
ngcompass:all27 rulesEvery built-in rule enabled at its default severity. Useful for exploring the full rule surface on a new project.
Includesall 27 rules
Inspect preset rules
Use the CLI to list all rules that would be active under a given preset:
01npx ngcompass rules --preset recommendedInspect a specific rule:
01npx ngcompass rules prefer-on-push-component-change-detectionOverriding preset rules
You can turn off or adjust the severity of any rule inherited from a preset via the rules key:
01extends: 'ngcompass:recommended',02rules: {03 // Promote a warning to an error04 'rxjs-avoid-subject-as-event-bus': 'error',05 // Turn off a rule you don't want06 'prefer-inject-over-constructor-di': 'off',07}