An ESLint plugin for linting Handlebars templates, version 1.0.4. It enforces consistent formatting and validates template syntax, including block spacing, quotes, indentation, and closing tags. Provides recommended and strict configurations. All rules are auto-fixable except no-missing-closing-tag. Requires ESLint >=8.57.0 and Node.js >=18.18.0. Unlike general formatters, it targets Handlebars-specific syntax errors and style issues.
npm install eslint-plugin-handlebarsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Flat config example that enables all rules with error level, demonstrating recommended strict setup.
Switch to ESM: set "type": "module" in package.json and use import statements.
Upgrade ESLint to >=8.57.0.
Migrate to flat config using eslint.config.js.
Run eslint with --fix for auto-fixable rules; manually fix missing closing tags.
Set plugins: { handlebars } not plugins: ['handlebars'].Run npm install eslint-plugin-handlebars --save-dev and restart ESLint.
Change to plugins: { handlebars } (object with key matching the import).Replace const handlebars = require('eslint-plugin-handlebars') with import handlebars from 'eslint-plugin-handlebars'.