ember-template-lint-plugin-discourse

raw JSON →
3.0.0 verified Fri May 01 auth: no javascript

A shareable Ember template lint plugin providing a recommended ruleset for Discourse projects. Version 3.0.0 is the latest stable release. It extends ember-template-lint with Discourse-specific Handlebars/HTMLBars conventions. Unlike general lint plugins, this package enforces Discourse's custom formatting rules, making it essential for Discourse addon or theme development. Release cadence is low; updates typically track Discourse core changes.

error Cannot find module 'ember-template-lint-plugin-discourse'
cause Plugin not installed or missing in node_modules.
fix
Run npm install --save-dev ember-template-lint-plugin-discourse
error Unknown configuration extends value "discourse:recommended"
cause Plugin not included in plugins array.
fix
Add 'ember-template-lint-plugin-discourse' to the plugins array in .template-lintrc.js
gotcha The plugin must be listed in 'plugins' before using 'extends: discourse:recommended'.
fix Ensure the plugin is included in the plugins array.
deprecated Older versions (<3.0) may have used a different extends value or plugin name.
fix Upgrade to 3.0 and use 'discourse:recommended'.
breaking Version 3.0 drops support for Node.js 10 and older Ember versions.
fix Use Node.js 12+ and Ember 3.20+.
npm install ember-template-lint-plugin-discourse
yarn add ember-template-lint-plugin-discourse
pnpm add ember-template-lint-plugin-discourse

Configures ember-template-lint with the Discourse plugin and recommended ruleset.

// Install with ember-template-lint
// npm install --save-dev ember-template-lint ember-template-lint-plugin-discourse

// .template-lintrc.js
module.exports = {
  plugins: ['ember-template-lint-plugin-discourse'],
  extends: 'discourse:recommended',
  rules: {
    // Override or add rules as needed
  }
};

// Run linting
// npx ember-template-lint .