Type checker and linter for Knockout.js view bindings. Version 0.3.5 enables type-checking Knockout data-bind attributes against TypeScript viewmodel definitions. It detects common mistakes in Knockout views (e.g., misspelled bindings, wrong observable usage) and integrates via CLI or build tools. Unlike generic HTML linting, it understands Knockout-specific syntax and viewmodel types. Maintained by the kolint team.
npm install knockout-lintNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to annotate an HTML view with a TypeScript viewmodel and run the linter via npx.
Use the exact syntax: <!-- ko-import ViewModel from './viewmodel' --> and <!-- ko-viewmodel ViewModel -->
Export default class or interface in the referenced module.
Ensure bindings are standard Knockout bindings or update the tool's pattern list.
Ensure the viewmodel file exists and the import path is correct (e.g., './viewmodel' for viewmodel.ts).
Add a default export to your viewmodel file.
No dependency data recorded yet.