Analyzer
Introduction
What is this?
The analyzer allows you to find issues in your Knockout views (in HTML) build-time. The analyzer provides a set of predefined rules that helps you find common misstakes or enforce code style. You can also configure external tools such as TypeScript and ESLint to lint directly on the views.
html
<p data-bind="events: ..."></p>
~~~~~~
Binding handler "events" is not defined. Did you mean "event"?Setup
sh
# Make sure you have the CLI installed.
$ npm install --save-dev @knuckles/cli
# This will configure the analyzer for you.
$ npx ko add analyzersh
# Make sure you have the CLI installed.
$ yarn add --dev @knuckles/cli
# This will configure the analyzer for you.
$ yarn ko add analyzersh
# Make sure you have the CLI installed.
$ pnpm add --save-dev @knuckles/cli
# This will configure the analyzer for you.
$ pnpm ko add analyzersh
# Make sure you have the CLI installed.
$ bun add --save-dev @knuckles/cli
# This will configure the analyzer for you.
$ bun ko add analyzerUsage
sh
$ npx ko analyze --helpsh
$ yarn ko analyze --helpsh
$ pnpm ko analyze --helpsh
$ bun ko analyze --help