Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
ember-template-lint-plugin-prettier
Advanced tools
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.0
Note: 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.
You may want to define these two scripts in your package.json:
{
"scripts": {
"lint:hbs": "ember-template-lint .",
"format:hbs": "prettier **/*.hbs --write"
}
}
yarn lint:hbs
is useful in CI. yarn format:hbs
will let you format your templates if your editor does not have this feature yet.
This plugin has been inspired by the prettier plugin for Eslint.
See CONTRIBUTING.md
v5.0.0 (2023-07-13)
FAQs
A prettier plugin for ember-template-lint
The npm package ember-template-lint-plugin-prettier receives a total of 9,957 weekly downloads. As such, ember-template-lint-plugin-prettier popularity was classified as popular.
We found that ember-template-lint-plugin-prettier demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.