title: Varying ESLint handling for mjs, js, and ts files
body: <p>My project uses ESM (.mjs) files for server-side code, CommonJS (.js) for tooling, and TypeScript (.ts) for the client.</p>
  <p>When viewing CommonJS files in VS Code, errors are being shown for requires...&quot;Require statement not part of import statement.eslint@typescript-eslint/no-var-requires.&quot;</p>
  <p>This is a good rule for the .ts files but not for CommonJS.</p>
  <p>Here's my ESLint config from my package.json...</p>
  <pre><code> &quot;eslintConfig&quot;: {
      &quot;root&quot;: true,
      &quot;env&quot;: {
        &quot;node&quot;: true
      },
      &quot;extends&quot;: [
        &quot;plugin:vue/essential&quot;,
        &quot;eslint:recommended&quot;,
        &quot;@vue/typescript/recommended&quot;,
        &quot;@vue/prettier&quot;,
        &quot;@vue/prettier/@typescript-eslint&quot;
      ],
      &quot;parserOptions&quot;: {
        &quot;ecmaVersion&quot;: 2020
      },
      &quot;rules&quot;: {
        &quot;prettier/prettier&quot;: [
          &quot;error&quot;,
          {
            &quot;semi&quot;: false
          }
        ]
      },
      &quot;overrides&quot;: [
        {
          &quot;files&quot;: [
            &quot;**/__tests__/*.{j,t}s?(x)&quot;,
            &quot;**/tests/unit/**/*.spec.{j,t}s?(x)&quot;
          ],
          &quot;env&quot;: {
            &quot;jest&quot;: true
          }
        }
      ]
    },
  </code></pre>
  <p>Any thoughts as to how I should structure it applies TypeScript rules to .ts, CommonJS rules to .js and ESM rules to .msj?</p>