ESLint plugin enforcing Canonical style rules and TypeScript best practices. Current version 5.1.3 (stable, active development). Includes rules for filename conventions, import ordering, type import preferences, destructuring newlines, and identifier naming. Requires @typescript-eslint/parser. Provides recommended config. Differentiators: opinionated set of rules beyond standard ESLint/TypeScript-ESLint, promotes inline type imports, and strict naming conventions. Release cadence: multiple minor/patch releases per year.
npm install eslint-plugin-canonicalVerified import paths — ran on the pinned version, not inferred.
Configures ESLint with Canonical plugin and recommended rules, plus custom rules for filename matching and inline type imports.
Upgrade Node to >=12, ESLint to >=6.
Use ESLint's built-in 'no-extend-native' rule instead.
Set parser to '@typescript-eslint/parser' in ESLint config.
Review rule options; previously allowed all on same line by default.
Use 'canonical/rule-name' instead of just 'rule-name'.
Remove 'canonical/id-match' and use ESLint's 'id-match' rule.
Run 'npm install eslint-plugin-canonical --save-dev'
Run 'npm install @typescript-eslint/parser --save-dev'
Check rule names in documentation; they must match exactly.
Set 'parserOptions.project' to './tsconfig.json' or adjust path.