I've seen a ton of modules that specify fs and path in their dependencies.
http://npm.im/fs
It may be a bit hacky, but you could possibly store an array of built-in Node modules from https://nodejs.org/dist/latest-v6.x/docs/api/ (ie: "assert", "buffer", "child_process", "fs", "http", "path", etc) and then display warnings if the package.json uses any of those built-in modules.
Of course, there may be a valid reason to use the npm version of "path", so I guess they shouldn't be fatal errors, but I find most people may do npm i fs path -S by mistake and often don't want them or understand they have been built-in since Node 0.1. :shrug:
I've seen a ton of modules that specify
fs
andpath
in their dependencies. http://npm.im/fsIt may be a bit hacky, but you could possibly store an array of built-in Node modules from https://nodejs.org/dist/latest-v6.x/docs/api/ (ie: "assert", "buffer", "child_process", "fs", "http", "path", etc) and then display warnings if the package.json uses any of those built-in modules.
Of course, there may be a valid reason to use the npm version of "path", so I guess they shouldn't be fatal errors, but I find most people may do
npm i fs path -S
by mistake and often don't want them or understand they have been built-in since Node 0.1. :shrug: