title: match everything besides one folder - regex
body: <p>I'm trying to exclude files form being watched besides folder <code>app</code> in <code>watchOptions</code> in ESLint.
  My folder structure looks like:</p>
  
  <pre><code>├── assets
  │   ├── assets
  │   │   └── fonts
  │   │       ├── FeatherIcons
  │   │       ├── Icomoon
  │   │       └── Montserrat
  │   ├── images
  │   ├── imagesNotOptimized
  │   ├── js
  │   │   ├── app
  │   │   │   ├── api
  │   │   │   │   ├── erpFlex
  </code></pre>
  
  <p>I would like to include all the files inside <code>app</code> but ignore all other files.</p>
  
  <pre><code>config.watchOptions = {
      poll: true,
      ignored: [
          path.resolve(__dirname, 'node_modules'),
          path.resolve(__dirname, 'assets/js/*!(app)'),
      ]
  };  
  </code></pre>
  
  <p>I have tried the following regexes </p>
  
  <ol>
  <li>assets/js/*(!app)</li>
  <li>assets/js/(?!app)</li>
  </ol>
  
  <p>Nothing seems to work. Any help would be much appreciated. Thank you </p>
  
  <p><strong>EDIT</strong>
  I have been able to match the string using the following regex: <a href="https://regex101.com/r/hs4lOt/1" rel="nofollow noreferrer">https://regex101.com/r/hs4lOt/1</a></p>
  
  <p>but <code>path.resolve(__dirname, 'assets/js/(?!app).*')</code> is not working which makes this question not about regex but why <code>ignored</code> is not working in <code>watchOptions</code></p>