Closed
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-protocol
feat(prefer-node-protocol): Add support forprocess.getBuiltinModule()
#430 -
no-unsupported-features/node-builtins
feat(node-builtins): Add support forprocess.getBuiltinModule()
#433 -
no-deprecated-api
feat(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?