Registry / testing / ember-template-lint-plugin-page-title

ember-template-lint-plugin-page-title

JSON →
library1.0.1jsnpmunverified

An ember-template-lint plugin that enforces every route template to have a page title set using the `{{page-title}}` helper. Version 1.0.1 is the current stable release, with no recent release cadence data. Key differentiator: it ensures route templates in Ember applications always contain a page title, leveraging the ember-page-title addon, and integrates seamlessly with the ember-template-lint rule system.

npm install ember-template-lint-plugin-page-title
INSTALL
IMPORT
SIG · EMBER-TEMPLATE-LIN
E
ember-template-lint-plugin-page-title
testingjavascriptv1.0.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Plugin
module.exports = { plugins: ['ember-template-lint-plugin-page-title'], rules: { 'require-valid-page-title': 'warn' } };
const plugin = require('ember-template-lint-plugin-page-title')
The plugin is not imported as a JS module; it is referenced by name in the .template-lintrc.js plugins array.

Install and configure ember-template-lint-plugin-page-title to warn when route templates lack a page title.

// Install the plugin and peer dependency yarn add -D ember-template-lint ember-template-lint-plugin-page-title // .template-lintrc.js module.exports = { plugins: ['ember-template-lint-plugin-page-title'], rules: { 'require-valid-page-title': 'warn' } };
Debug
Known issues
gotchaThe plugin only works with ember-template-lint >=4.0.0. Older versions are incompatible.
fix
Ensure you have ember-template-lint version 4 or above installed.
affects: >=1.0.0
gotchaThe rule 'require-valid-page-title' must be added to the rules object; omitting it will have no effect.
fix
Add 'require-valid-page-title': 'warn' (or 'error') to your .template-lintrc.js rules.
affects: >=1.0.0
gotchaThe plugin assumes the presence of the {{page-title}} helper from ember-page-title. Without that addon installed, the rule may produce false positives.
fix
Install ember-page-title: yarn add -D ember-page-title
affects: >=1.0.0
Errors
Common errors & fixes
Cannot find module 'ember-template-lint-plugin-page-title'
The plugin package is not installed or not listed in devDependencies.
fix
Run yarn add -D ember-template-lint-plugin-page-title
Rule 'require-valid-page-title' was not found
The plugin is not registered in the plugins array of .template-lintrc.js.
fix
Add 'ember-template-lint-plugin-page-title' to the plugins array in your config file.
Upgrade
Version history
1.0.1latest on npm
Audit
Dependencies
ember-template-lintrequiredPeer dependency; the plugin requires ember-template-lint >=4.0.0 to run its rules
Agent activity
4 hits · last 30 days
node
4
Resources
ember-template-lint-plugin-page-title — npm install ember-template-lint-plugin-page-title · libregistry