forked from mysticatea/eslint-plugin-node
-
-
Notifications
You must be signed in to change notification settings - Fork 54
Open
Description
Rule details
We have 3 apis for deleting files and directories:
- fs.rm
- fs.unlink
- fs.rmdir
I prefer to consistently use fs.rm, so that I can easily find out all deleting operations by searching fs.rm in code base.
What type of rule is this?
Warns about a potential problem
Example code
import fs from 'node:fs';
import fs from 'node:fs/promises'; // This rule should support node:fs/promises
// These lines of code are considered problematic.
fs.unlink();
fs.rmdir();
fs.unlinkSync();
fs.rmdirSync();Participation
- I am willing to submit a pull request to implement this rule.
Additional comments
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels