
Product
Rust Support Now in Beta
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
eslint-plugin-hbs
Advanced tools
Provide linting for hbs template literals inside of JavaScript
You'll first need to install ESLint:
$ npm i eslint --save-dev
Next, install eslint-plugin-hbs
:
$ npm install eslint-plugin-hbs --save-dev
Note: If you installed ESLint globally (using the -g
flag) then you must also install eslint-plugin-hbs
globally.
Add hbs
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": [
"hbs"
]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"hbs/check-hbs-template-literals": 2
}
}
or
"rules": {
'hbs/check-hbs-template-literals': [
'error', 2,
{'ConfigFile': __dirname + '/.eslint-template-lintrc.json'}
],
}
The plugin will report the number of errors and the first line of the first error. Here's a running example. Left-hand side is the output of eslint
from the command-line, right-hand side is vim
running with eslint
(via syntastic):
FAQs
Provide linting for hbs template literals inside of JavaScript
The npm package eslint-plugin-hbs receives a total of 2,348 weekly downloads. As such, eslint-plugin-hbs popularity was classified as popular.
We found that eslint-plugin-hbs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.