title: Exclude *.spec.ts files when transpiling but still lint them properly
body: <p>How can I exclude typescript files from being transpiled but still ensure that they work properly with the linter in the Atom editor?</p>
  
  <p>I'm getting this error in my <code>*.spec.ts</code> files:</p>
  
  <blockquote>
    <p>An async function or method in ES5/ES3 requires the 'Promise'
    constructor. Make sure you have a declaration for the 'Promise'
    constructor or include 'ES2015' in your <code>--lib</code> option.</p>
  </blockquote>
  
  <p>The problem occurs because I'm explicitly excluding the directory with all of my test files (see the tsconfig file below), because I don't want these files to be transpiled to JavaScript when I build the project. However, I do want these files to be properly linted by the tslint plugin while I'm viewing them in the Atom editor.</p>
  
  <p>My setup:</p>
  
  <ul>
  <li>Atom.io 1.30 with plugins:
  
  <ul>
  <li>atom-typescript 12.6.3</li>
  <li>language-typescript 0.4.0</li>
  <li>linter-tslint 1.9.1</li>
  </ul></li>
  <li>tslint 5.9.1</li>
  <li>typescript 3.0.1</li>
  </ul>
  
  <p>My <code>tsconfig.json</code> file:</p>
  
  <pre><code>{
    "compileOnSave": false,
    "compilerOptions": {
      "allowUnreachableCode": false,
      "allowUnusedLabels": false,
      "baseUrl": ".",
      "declaration": true,
      "emitDecoratorMetadata": true,
      "experimentalDecorators": true,
      "inlineSourceMap": true,
      "inlineSources": true,
      "lib": [
        "es2017",
        "dom"
      ],
      "moduleResolution": "node",
      "newLine": "lf",
      "noImplicitReturns": true,
      "noImplicitThis": true,
      "noUnusedLocals": true,
      "noUnusedParameters": true,
      "outDir": "./dist",
      "target": "es5",
      "typeRoots": [
        "node_modules/@types"
      ]
    },
    "exclude": [
      "./spec",
      "./dist"
    ]
  }
  </code></pre>