forked from mysticatea/eslint-plugin-node
-
- Notifications
You must be signed in to change notification settings - Fork 55
Closed
Labels
Description
eslint-plugin-n version
v17.17.0
What problem do you want to solve?
I think process.getBuiltinModule('fs') should be treated the same as require('fs') or import fs from 'fs'.
It would be nice if the rules in this plugin could also check process.getBuiltinModule('fs').
What do you think is the correct solution?
Add support for process.getBuiltinModule()
Participation
- I am willing to submit a pull request for this change.
Additional comments
I think we first need to list which rules it affects.
I think the following rules are probably subject to change:
-
prefer-node-protocolfeat(prefer-node-protocol): Add support forprocess.getBuiltinModule()#430 -
no-unsupported-features/node-builtinsfeat(node-builtins): Add support forprocess.getBuiltinModule()#433 -
no-deprecated-apifeat(no-deprecated-api): Add support forprocess.getBuiltinModule()#435 -
prefer-global/*feat(prefer-global): Add support forprocess.getBuiltinModule()#436 -
prefer-promises/*feat(prefer-promises): Add support forprocess.getBuiltinModule()#437
What do you think?
fisker