SKIP OPTIONAL DEPENDENC: Skip Configuration Option in package.json

It would be really nice to run npm i and only see messages need my attention such as missing optional dependencies that I have not skipped in package.json.

Here is what is currently distracting me when running npm i. I know there is a –no-optional which can hide all optional dependencies, but if I do it all the time then I will not be aware of some possible important dependencies in the future.

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

The Possible Solution

In package.json add a new config called skip and the syntax would look like this:

{
   "skip": ["fsevents"]
}

Any optional dependencies which is in this skip array would not output “SKIPPING OPTIONAL DEPENDENCY”. There could even be a message indicating how many packages have been skipped ie:

npm INFO 1 package has been skipped