
Research
/Security News
Malicious npm Packages Target WhatsApp Developers with Remote Kill Switch
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.
eslint-plugin-misc
Advanced tools
A collection of ESLint rules for JavaScript and TypeScript files.
npm install --save-dev eslint-plugin-misc
// .eslintrc.js
module.exports = {
extends: "plugin:misc/all",
parser: "@typescript-eslint/parser",
plugins: ["misc"]
};
You can use the same rule several times by adding synonym:
// .eslintrc.synonyms.cjs
module.exports = ["misc/wrap/class-methods-use-this", "misc/wrap/no-shadow"];
// .eslintrc.js
module.exports = {
rules: {
// Same as ESLint core rule, but suppresses warnings for methods that have "this" parameter.
"misc/wrap/class-methods-use-this": [
"error",
{
plugin: "eslint",
rule: "class-methods-use-this",
skip: "FunctionExpression[params.0.name=this]"
}
],
// Same as typescript-eslint rule, but suppresses warnings for enums.
"misc/wrap/no-shadow": [
"error",
{
plugin: "@typescript-eslint/eslint-plugin",
rule: "no-shadow",
skip: "TSEnumDeclaration *"
}
]
}
};
Many custom checks can be created without writing full-fledged ESLint plugin. Use the rules below to create custom checks or adapt existing third-party rules:
If you want to apply one rule several times (e.g. restrict several syntaxes), use rule synonyms.
x && y
or !x
.import { x as y }
statement is from allowed list.import { x } from "source"
and import { x as y } from "source"
in the same file.FAQs
ESLint plugin
We found that eslint-plugin-misc demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Research
/Security News
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.
Research
/Security News
Socket uncovered 11 malicious Go packages using obfuscated loaders to fetch and execute second-stage payloads via C2 domains.
Security News
TC39 advances 11 JavaScript proposals, with two moving to Stage 4, bringing better math, binary APIs, and more features one step closer to the ECMAScript spec.