Overview of NestJS ESLint rules
mainThis plugin provides ESLint rules specifically designed for NestJS applications to prevent common bugs, security issues, and dependency injection errors. The rules are categorized into four main areas:
- Nest Dependency Injection (DI) issues: Detects mismatches in custom providers and ensures injectables are correctly provided to prevent runtime errors.
- Open API / Swagger enforcement: Enforces strict typing and decorator usage for NestJS controllers and models to ensure clean Open API specification generation (useful for automatic client generation).
- Bug Prevention: Catches issues with untyped decorators and other tightly coupled NestJS features.
- Security: Helps prevent vulnerabilities related to
class-transformerandValidationPipeconfiguration (e.g., addressing CVE-2019-18413).