{"id":19863,"library":"eslint-plugin-node-dependencies","title":"eslint-plugin-node-dependencies","description":"ESLint plugin (v2.2.0, active development) that lints package.json dependencies for issues like missing or mismatched engines, deprecated packages, or improper provenance. Requires Node >= 20.19 and ESLint >= 9.38. Released as needed with minor and patch updates. Differentiated from other ESLint plugins by focusing specifically on dependency metadata integrity rather than code style or security scanning.","status":"active","version":"2.2.0","language":"javascript","source_language":"en","source_url":"https://github.com/ota-meshi/eslint-plugin-node-dependencies","tags":["javascript","eslint","eslintplugin","eslint-plugin","nodejs","dependencies","json"],"install":[{"cmd":"npm install eslint-plugin-node-dependencies","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-plugin-node-dependencies","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-plugin-node-dependencies","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency; plugin requires ESLint v9.38.0 or higher","package":"eslint","optional":false}],"imports":[{"note":"ESM-only since v2.0.0; CommonJS require() will fail.","wrong":"const nodeDependenciesPlugin = require('eslint-plugin-node-dependencies')","symbol":"default","correct":"import nodeDependenciesPlugin from 'eslint-plugin-node-dependencies'"},{"note":"Named export 'rules' is available directly; do not destructure from default.","wrong":"import plugin from 'eslint-plugin-node-dependencies'; const { rules } = plugin","symbol":"rules","correct":"import { rules } from 'eslint-plugin-node-dependencies'"},{"note":"Named export 'configs' provides flat configs; use plugin.configs.recommended in flat config.","wrong":"import plugin from 'eslint-plugin-node-dependencies'; const { configs } = plugin","symbol":"configs","correct":"import { configs } from 'eslint-plugin-node-dependencies'"}],"quickstart":{"code":"import nodeDependenciesPlugin from 'eslint-plugin-node-dependencies';\n\nexport default [\n  ...nodeDependenciesPlugin.configs.recommended,\n];\n","lang":"typescript","description":"Sets up the recommended rules for eslint-plugin-node-dependencies in an ESLint flat config file."},"warnings":[{"fix":"Migrate from .eslintrc.* to eslint.config.js using flat config format.","message":"v2.0.0 dropped support for legacy (eslintrc) config. Only flat config is supported.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Update Node.js to ^20.19.0, ^22.13.0, or >=24.","message":"Requires Node.js ^20.19.0 || ^22.13.0 || >=24. Older Node versions are incompatible.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Upgrade ESLint to v9.38.0 or later.","message":"Requires ESLint >=9.38.0. ESLint v8 and older are not supported.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Pin exact version in package.json and test upgrades thoroughly.","message":"The plugin is experimental; rules may change without major version bump.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Ensure eslint/json is installed if using JSON-related features.","message":"The package uses eslint-json-compat-utils for compatibility with eslint/json, which may introduce additional behavior for JSON files.","severity":"gotcha","affected_versions":">=2.1.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"npm install --save-dev eslint-plugin-node-dependencies","cause":"Package not installed or not in node_modules.","error":"Error: Cannot find module 'eslint-plugin-node-dependencies'"},{"fix":"Use import nodeDependenciesPlugin from 'eslint-plugin-node-dependencies' and spread plugin.configs.recommended.","cause":"Using legacy eslintrc config or incorrect import style.","error":"TypeError: plugin.configs is not a function"},{"fix":"Switch to eslint.config.js with flat config; do not use 'extends' with plugin: prefix.","cause":"Legacy eslintrc config format used; plugin requires flat config.","error":"Error: Failed to load config 'plugin:node-dependencies/recommended'"},{"fix":"Wrap rules in an object with 'plugins' and 'rules' properties.","cause":"Misconfigured flat config: placing rules directly at top level instead of inside a config object.","error":"Error: ESLint configuration is invalid: - Unexpected top-level property \"rules\". Did you mean to use plugins?"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}