Security News
The Push to Ban Ransom Payments Is Gaining Momentum
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
ember-template-lint
Advanced tools
Changelog
v6.0.0 (2024-03-29)
recommended
rules: no-action-on-submit-button
, no-at-ember-render-modifiers
, no-builtin-form-components
, no-unnecessary-curly-parens
, no-unnecessary-curly-strings
, simple-modifiers
(@bmish)4-x-recommended
config with 5-x-recommended
(@bmish)DOCUMENT_STRUCTURE_ROLES
for no-invalid-role
rule (@mrloop)param
to obsolete list in no-obsolete-elements
rule (@geneukum)Tracking issue: https://github.com/ember-template-lint/ember-template-lint/issues/2712
Readme
ember-template-lint
is a library that will lint your handlebars template and return error results.
For example, if the rule no-bare-strings
is enabled, this template would be
in violation:
{{! app/components/my-thing/template.hbs }}
<div>A bare string</div>
When the ember-template-lint
executable is run, we would have a single result indicating that
the no-bare-strings
rule found an error.
^18.18.0 || ^20.9.0 || >=21.1.0
npm install --save-dev ember-template-lint
yarn add --dev ember-template-lint
Note: this library is installed by default with new Ember apps.
While ember-template-lint
does have a Node API, the main way to use it is through its executable, which is intended to be installed locally within a project.
Basic usage is as straightforward as
ember-template-lint .
See documentation on workflow examples.
See documentation on the todo functionality.
You can turn on specific rules by toggling them in a
.template-lintrc.js
file at the base of your project, or at a custom relative
path which may be identified using the CLI:
module.exports = {
extends: 'recommended',
rules: {
'no-bare-strings': true,
},
};
For more detailed information see configuration.
Name | Description | |
---|---|---|
✅ | recommended | Enables the recommended rules. |
💅 | stylistic | Enables stylistic rules for those who aren't ready to adopt ember-template-lint-plugin-prettier (including stylistic rules that were previously in the recommended preset in ember-template-lint v1). |
⌨️ | a11y | Enables A11Y rules. Its goal is to include all A11Y related rules, therefore it does not follow the same SemVer policy as the other presets. Please see versioning for more details. |
Each rule has emojis denoting:
--fix
command line option--fix
optionYou can add a fixer to a rule. See fixer documentation for more details.
It is possible to share a config (extends
) or plugin (custom rules) across projects. See ember-template-lint-plugin-peopleconnect for an example.
You can define and use your own custom rules using the plugin system. See plugin documentation for more details.
The semver policy for this addon can be read here: semver policy.
See the Contributing Guidelines for information on how to help out.
This project is licensed under the MIT License.
FAQs
Linter for Ember or Handlebars templates.
The npm package ember-template-lint receives a total of 116,730 weekly downloads. As such, ember-template-lint popularity was classified as popular.
We found that ember-template-lint demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 7 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
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
Application Security
New SEC disclosure rules aim to enforce timely cyber incident reporting, but fear of job loss and inadequate resources lead to significant underreporting.
Security News
The Python Software Foundation has secured a 5-year sponsorship from Fastly that supports PSF's activities and events, most notably the security and reliability of the Python Package Index (PyPI).