title: mocha.opts is deprecated - how to migrate to .mocharc
body: <p>I am using an <code>mocha.opts</code> file to configure my tests in VS Code.</p>
  
  <pre><code>DeprecationWarning: Configuration via mocha.opts is DEPRECATED and will be removed from a future version of Mocha. Use RC files or package.json instead.
  </code></pre>
  
  <p>I am unable to run my tests now and would like to migrate to a mocharc file.
  I don't mind the mocharc format being yaml or json.
  The mocha documentation is lengthy and doesn't provide migration examples.</p>
  
  <p>Q1: How to do that, are there any examples?</p>
  
  <p><code>EDIT:</code></p>
  
  <p>I have found this: <a href="https://github.com/mochajs/mocha/blob/master/example/config/.mocharc.yml" rel="noreferrer">https://github.com/mochajs/mocha/blob/master/example/config/.mocharc.yml</a></p>
  
  <p>Which is an example of a .mocharc.yaml config containing all possible fields.</p>
  
  <p>Q2: What about env vars, I could set them in mocha.opts, how to do that in the .mocharc?</p>