
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
eslint-plugin-delegated-events
Advanced tools
Disallow delegating high-frequency events.
The delegated-events library registers all event listeners on
document
, using selectors to determine an observer's interest in each
event.
on('click', '.js-button', function(event) {
console.log('clicked', this)
})
This is appropriate for most events, like click
and change
, but
events fired at a high rate need to be directly bound with
element.addEventListener
to avoid performance problems.
This lint rule disallows delegated event listeners on the following events:
You'll first need to install ESLint:
$ npm install eslint --save-dev
Next, install eslint-plugin-delegated-events
:
$ npm install eslint-plugin-delegated-events --save-dev
Note: If you installed ESLint globally (using the -g
flag) then you must also install eslint-plugin-delegated-events
globally.
Add delegated-events
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": [
"delegated-events"
],
"rules": {
"delegated-events/no-high-freq": 2
}
}
npm install
npm test
Distributed under the MIT license. See LICENSE for details.
FAQs
Disallow delegating high-frequency events.
The npm package eslint-plugin-delegated-events receives a total of 277 weekly downloads. As such, eslint-plugin-delegated-events popularity was classified as not popular.
We found that eslint-plugin-delegated-events 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.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.