
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
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
The npm package eslint-plugin-misc receives a total of 562 weekly downloads. As such, eslint-plugin-misc popularity was classified as not popular.
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.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.