{
  "schemaVersion": "ebb.rule.v1",
  "id": "nodejs.symbol.fs.rmdir-recursive",
  "ecosystem": "nodejs",
  "purl": "pkg:generic/nodejs",
  "affectedVersions": "vers:semver/>=25.0.0",
  "event": "removed",
  "severity": "high",
  "title": "The recursive option of fs.rmdir has been removed",
  "summary": "Node.js removed the recursive option of fs.rmdir() and fs.rmdirSync() (DEP0147: documentation-only since v14.14.0, runtime since v16.0.0, end-of-life since v25.0.0).",
  "replacement": "fs.rm(path, { recursive: true, force: true })",
  "sources": [
    {
      "title": "Node.js deprecations: DEP0147 fs.rmdir recursive",
      "url": "https://nodejs.org/api/deprecations.html",
      "accessedAt": "2026-10-21"
    }
  ],
  "provenance": {
    "observedAt": "2026-10-21",
    "reviewedAt": "2026-10-21",
    "reviewer": "arminazimi"
  },
  "migration": {
    "constraints": [
      "Keep the behavior of the call unchanged; check the replacement's argument and error handling differences."
    ],
    "steps": [
      {
        "id": "replace-symbol",
        "title": "Use fs.rm",
        "instructions": "Replace fs.rmdir(path, { recursive: true }) with fs.rm(path, { recursive: true, force: true }), and the sync form with fs.rmSync.",
        "targets": "usages"
      }
    ],
    "verification": [
      {
        "command": "npm run test --if-present",
        "purpose": "Run the repository tests when defined."
      }
    ]
  }
}
