
Security News
CISA Kills Off RSS Feeds for KEVs and Cyber Alerts
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.
eslint-plugin-depend
Advanced tools
An ESLint plugin to suggest optimized dependencies, native alternatives and more
This is an ESLint plugin to help suggest alternatives to various dependencies.
Primarily, it will help detect dependency tree bloat and redundant polyfills.
npm i -D eslint-plugin-depend
If you're using the new flat config files, add to your eslint.config.js
:
import depend from 'eslint-plugin-depend';
import {defineConfig} from 'eslint/config';
export default defineConfig([
{
files: ['**/*.js'],
plugins: {
depend
},
extends: ['depend/flat/recommended'],
}
]);
For older legacy projects, add to your .eslintrc.json
:
{
"extends": [
"plugin:depend/recommended"
]
}
package.json
Some rules (e.g. ban-dependencies
) can be used against your package.json
.
You can achieve this by using jsonc-eslint-parser
.
For example, in your .eslintrc.json
:
{
"overrides": [
{
"files": ["package.json"],
"parser": "jsonc-eslint-parser",
"plugins": ["depend"],
"rules": {
"depend/ban-dependencies": "error"
}
}
]
}
Read more at the
jsonc-eslint-parser
docs.
MIT
FAQs
An ESLint plugin to suggest optimized dependencies, native alternatives and more
The npm package eslint-plugin-depend receives a total of 90,211 weekly downloads. As such, eslint-plugin-depend popularity was classified as popular.
We found that eslint-plugin-depend 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
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.