It uses Prettier to lint your handlebars templates with ember-template-lint. The plugin defines a - single - rule. That rule will compare your code with Prettier's output.
Here is an output example:
2:18 error Replace `·{{@lastName}}··` with `{{@lastName}}` prettier
1 | <h1>A title</h1>
> 2 | <p>{{@firstName}} {{@lastName}} , welcome!</p>
3 | <p>Text</p>
^16.0.0 || ^18.0.0 || >=20.0.0>=4.0.0>=3.0.0Note: ember-template-lint-plugin-prettier@4 is compatible with older versions of prettier, in particular prettier@2.
Note2: ember-template-lint-plugin-prettier@3 is compatible with older versions of ember-template-lint, in particular ember-template-lint@3.
yarn add -D prettier ember-template-lint-plugin-prettier
As peerDependencies, prettier and ember-template-lint will have to be installed in your project. Prettier version local to the project will be used (not any global one!).
A recommended configuration is available. To use it, merge the following object
to your .template-lintrc.js file:
module.exports = {
plugins: ["ember-template-lint-plugin-prettier"],
extends: ["recommended", "ember-template-lint-plugin-prettier:recommended"]
};
The recommended set will apply these rules.
Prettier can be configured via standard prettier config files.
This plugin has been inspired by the prettier plugin for Eslint.
See CONTRIBUTING.md
303 followers · starred Jun 2020
26 followers · starred Jun 2023
221 followers · starred Jul 2020
1,662 followers · starred Jun 2019
It uses Prettier to lint your handlebars templates with ember-template-lint. The plugin defines a - single - rule. That rule will compare your code with Prettier's output.
Here is an output example:
2:18 error Replace `·{{@lastName}}··` with `{{@lastName}}` prettier
1 | <h1>A title</h1>
> 2 | <p>{{@firstName}} {{@lastName}} , welcome!</p>
3 | <p>Text</p>
^16.0.0 || ^18.0.0 || >=20.0.0>=4.0.0>=3.0.0Note: ember-template-lint-plugin-prettier@4 is compatible with older versions of prettier, in particular prettier@2.
Note2: ember-template-lint-plugin-prettier@3 is compatible with older versions of ember-template-lint, in particular ember-template-lint@3.
yarn add -D prettier ember-template-lint-plugin-prettier
As peerDependencies, prettier and ember-template-lint will have to be installed in your project. Prettier version local to the project will be used (not any global one!).
A recommended configuration is available. To use it, merge the following object
to your .template-lintrc.js file:
module.exports = {
plugins: ["ember-template-lint-plugin-prettier"],
extends: ["recommended", "ember-template-lint-plugin-prettier:recommended"]
};
The recommended set will apply these rules.
Prettier can be configured via standard prettier config files.
This plugin has been inspired by the prettier plugin for Eslint.
See CONTRIBUTING.md
303 followers · starred Jun 2020
26 followers · starred Jun 2023
221 followers · starred Jul 2020
1,662 followers · starred Jun 2019