title: Angular 9 + CLI (TypeScript) - How to stop generating .spec.ts test files
body: <p><strong>I know it's kind of a bad practice</strong>, but bear with me:</p>
  
  <p>I'm using Angular-CLI, particularly <code>ng g</code> to generate all of my classes. However, I'm not interested in any <code>*.spec.ts</code> test files. I know that there are two flags (<code>--inline-template</code>, <code>--inline-style</code>) to handle inline CSS and HTML instead of separated files, and for spec the <code>--spec</code> flag is set to true by default.</p>
  
  <p>So for each run, yes, I could do <code>ng g c foo --it --is --spec=false</code>.</p>
  
  <p>But how do I disable the creation of test files globally? Is there any default setting for it?</p>
  
  <p>Rashly, I did some stuff <strong>(that didn't work)</strong>, like:</p>
  
  <pre><code>ng set spec=false --global
  </code></pre>
  
  <p>I also tried configuring my <code>src/tsconfig.json</code> by filling the exclude array:</p>
  
  <pre><code>"exclude": [
      "**/*.spec.ts"
  ]
  </code></pre>