Getting Started
Shared code conventions for Angular and Ionic applications, with framework-independent TypeScript presets for Cloudflare Workers. Catch inconsistent component boundaries, template usage, and implicit timezone operations during linting, before they reach code review.
Try lint detection and autofix in a small TypeScript project, without installing Angular or Ionic.
Install
Install the plugin as a development dependency in an ESLint project:
npm install --save-dev @rdlabo/eslint-plugin-rules
For Angular and Ionic rules, also install the corresponding framework peers below. For a complete setup, follow Configuration.
Requirements
| Package | Supported version |
|---|---|
| Node.js | 20 or later |
| ESLint | 9 or later |
@typescript-eslint/utils |
8.33 or later, before 9 |
@angular-eslint/template-parser |
21.x or 22.x |
@ionic/angular |
9.x when Ionic rules are used |
@ionic/core |
9.x when Ionic rules are used |
Choose an entry point
| Preset | Entry point | Purpose |
|---|---|---|
recommended |
@rdlabo/eslint-plugin-rules |
Angular and Ionic conventions for TypeScript and HTML |
workers/recommended |
@rdlabo/eslint-plugin-rules/typescript |
Opt-in Workers try/catch policy |
workers-timezone/recommended |
@rdlabo/eslint-plugin-rules/typescript |
Opt-in companion policy for @rdlabo/workers-timezone |
The Angular recommended preset ships with the package root. The two Workers presets are independent opt-ins on /typescript; neither includes the other. For timezone conversions and checks, pair with @rdlabo/workers-timezone. Flat Config selectors and Ionic list structure live in Configuration.
Documentation
- Configuration — copy a setup for Angular/Ionic, TypeScript, or Workers.
- Rules — compare preset coverage, options, and examples.
- Migration guide — update an existing installation.