Description
Description
Since fs.rmdir(path, { recursive: true })
is deprecated in Node.js v16.0.0, we should provide a codemod to replace it.
Examples
Before:
// Using fs.rmdir with the recursive option
fs.rmdir(path, { recursive: true }, callback);
// Using fs.rmdirSync with the recursive option
fs.rmdirSync(path, { recursive: true });
// Using fs.promises.rmdir with the recursive option
fs.promises.rmdir(path, { recursive: true });
After:
// Using fs.rm with recursive and force options
fs.rm(path, { recursive: true, force: true }, callback);
// Using fs.rmSync with recursive and force options
fs.rmSync(path, { recursive: true, force: true });
// Using fs.promises.rm with recursive and force options
fs.promises.rm(path, { recursive: true, force: true });