Lint Handlebars templates for missing variables, helpers, block helpers, or partials. Current stable version is 1.0.0. The package takes a template string and a context object with known helpers and variables, then returns an object categorizing any missing references. It differentiates between variables, helpers, block helpers, and partials. There is no active maintenance; the last release was in 2016 and the GitHub repository has been archived. It requires Node >=4 and depends on the `handlebars` package for parsing.
npm install handlebars-lintNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
This shows how to lint a simple Handlebars template for missing variables using the default import.
Migrate to eslint-plugin-handlebars or implement custom validation.
Explicitly define all helpers and variables in the context object to avoid misclassification.
Ensure Handlebars is installed and optionally pass `hbs: Handlebars` in options.
Use `{ context: { helpers: {}, variables: {} } }` as shown in examples.Install handlebars (`npm install handlebars`) and pass `options.hbs: require('handlebars')`.Provide a context object like `{ context: { helpers: {}, variables: {} } }`.Add `foo` to `context.helpers` if it is a helper, or to `context.variables` if it is a variable.