title: Turn off VSCode Typescript Errors for .JS / .JSX files & keep them for .TS / .TSX files?
body: <p>I am trying to use typescript as well as plain javascript. So some files are javascript files (.js), while others are typescript files (.ts). This works.</p>
  <p><em>However, my eslint in VSCode gives me  Typescript Errors &amp; Warnings, even in the plain javascript files.</em></p>
  <p>Can I turn those off for the .js files, but keep them turned on whenever the file is a <code>.ts</code> / <code>.tsx</code> ?</p>
  <p>My eslint &amp; typescript configs are just <a href="https://github.com/vercel/next.js/tree/canary/examples/with-typescript-eslint-jest" rel="nofollow noreferrer">Vercels official typescript example</a>.</p>
  <p><code>.eslintignore</code> :</p>
  <pre><code>**/node_modules/*
  **/out/*
  **/.next/*
  </code></pre>
  <p><code>.eslintrc.json</code> :</p>
  <pre><code>{
    &quot;parser&quot;: &quot;@typescript-eslint/parser&quot;,
    &quot;plugins&quot;: [&quot;@typescript-eslint&quot;],
    &quot;extends&quot;: [
      &quot;eslint:recommended&quot;,
      &quot;plugin:react/recommended&quot;,
      &quot;plugin:@typescript-eslint/recommended&quot;,
      // Uncomment the following lines to enable eslint-config-prettier
      // Is not enabled right now to avoid issues with the Next.js repo
      &quot;prettier&quot;,
      &quot;prettier/@typescript-eslint&quot;
    ],
    &quot;env&quot;: {
      &quot;es6&quot;: true,
      &quot;browser&quot;: true,
      &quot;jest&quot;: true,
      &quot;node&quot;: true
    },
    &quot;settings&quot;: {
      &quot;react&quot;: {
        &quot;version&quot;: &quot;detect&quot;
      }
    },
    &quot;rules&quot;: {
      &quot;react/react-in-jsx-scope&quot;: 0,
      &quot;react/display-name&quot;: 0,
      &quot;react/prop-types&quot;: 0,
      &quot;@typescript-eslint/explicit-function-return-type&quot;: 0,
      &quot;@typescript-eslint/explicit-member-accessibility&quot;: 0,
      &quot;@typescript-eslint/indent&quot;: 0,
      &quot;@typescript-eslint/member-delimiter-style&quot;: 0,
      &quot;@typescript-eslint/no-explicit-any&quot;: 0,
      &quot;@typescript-eslint/no-var-requires&quot;: 0,
      &quot;@typescript-eslint/no-use-before-define&quot;: 0,
      &quot;@typescript-eslint/no-unused-vars&quot;: [
        2,
        {
          &quot;argsIgnorePattern&quot;: &quot;^_&quot;
        }
      ],
      &quot;no-console&quot;: [
        2,
        {
          &quot;allow&quot;: [&quot;warn&quot;, &quot;error&quot;]
        }
      ]
    }
  }
  </code></pre>
  <p><code>tsconfig.json</code> :</p>
  <pre><code>{
    &quot;compilerOptions&quot;: {
      &quot;target&quot;: &quot;es5&quot;,
      &quot;lib&quot;: [&quot;dom&quot;, &quot;dom.iterable&quot;, &quot;esnext&quot;],
      &quot;allowJs&quot;: true,
      &quot;skipLibCheck&quot;: true,
      &quot;strict&quot;: false,
      &quot;forceConsistentCasingInFileNames&quot;: true,
      &quot;noEmit&quot;: true,
      &quot;esModuleInterop&quot;: true,
      &quot;module&quot;: &quot;esnext&quot;,
      &quot;moduleResolution&quot;: &quot;node&quot;,
      &quot;resolveJsonModule&quot;: true,
      &quot;isolatedModules&quot;: true,
      &quot;jsx&quot;: &quot;preserve&quot;
    },
    &quot;exclude&quot;: [&quot;node_modules&quot;, &quot;.next&quot;, &quot;out&quot;, &quot;**/*.js&quot;, &quot;**/*.jsx&quot;],
    &quot;include&quot;: [&quot;next-env.d.ts&quot;, &quot;**/*.ts&quot;, &quot;**/*.tsx&quot;] 
  }
  </code></pre>
  <p><a href="https://i.stack.imgur.com/hmgwi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hmgwi.png" alt="enter image description here" /></a></p>