title: How to globally hide fsevents warning?
body: <p>Many questions such as <a href="https://stackoverflow.com/q/55855376/2612235">this</a> one talk about this very annoying behavior on non-mac OS.</p>
  <p>When I run <code>npm install</code> I want to remain aware of any warnings, but in Windows or Linux I would get this:</p>
  <pre><code>$ ./npm install
  npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
  npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
  npm notice created a lockfile as package-lock.json. You should commit this file.
  npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules/chokidar/node_modules/fsevents):
  npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {&quot;os&quot;:&quot;darwin&quot;,&quot;arch&quot;:&quot;any&quot;} (current: {&quot;os&quot;:&quot;linux&quot;,&quot;arch&quot;:&quot;x64&quot;})
  npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/watchpack-chokidar2/node_modules/chokidar/node_modules/fsevents):
  npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {&quot;os&quot;:&quot;darwin&quot;,&quot;arch&quot;:&quot;any&quot;} (current: {&quot;os&quot;:&quot;linux&quot;,&quot;arch&quot;:&quot;x64&quot;})
  npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/webpack-dev-server/node_modules/chokidar/node_modules/fsevents):
  npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {&quot;os&quot;:&quot;darwin&quot;,&quot;arch&quot;:&quot;any&quot;} (current: {&quot;os&quot;:&quot;linux&quot;,&quot;arch&quot;:&quot;x64&quot;})
  npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/laravel-mix/node_modules/chokidar/node_modules/fsevents):
  npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {&quot;os&quot;:&quot;darwin&quot;,&quot;arch&quot;:&quot;any&quot;} (current: {&quot;os&quot;:&quot;linux&quot;,&quot;arch&quot;:&quot;x64&quot;})
  npm WARN bootstrap@4.5.0 requires a peer of jquery@1.9.1 - 3 but none is installed. You must install peer dependencies yourself.
  
  added 279 packages from 165 contributors, removed 4 packages, updated 2 packages and audited 1978 packages in 27.632s
  </code></pre>
  <p>Notice that most <code>WARN</code> are caused by <code>fsevents</code> which is not available outside of macOS.</p>
  <p>Some suggest to hide <strong>every warnings</strong> with:</p>
  <pre><code>npm --logevel=error install
  </code></pre>
  <p>Others advise to use:</p>
  <pre><code>npm install --no-optional --no-shrinkwrap --no-package-lock
  </code></pre>
  <p>But all these methods does not seem right to me. I only want to execute <code>npm install</code> and have a configuration file that would hide all optional dependencies that are not available on my operating system.</p>
  <p>How can I do that?</p>