title: Resolve Error: typescript with invalid interface loaded as resolver ESLint
body: <p>I'm having ESLint in my project and getting an error <code>Resolve Error: typescript with invalid interface loaded  as resolver : import-no-restricted-paths</code> when I add the rule <code>import/no-restricted-paths</code></p>
  <p><a href="https://i.stack.imgur.com/W7X1r.png" rel="noreferrer"><img src="https://i.stack.imgur.com/W7X1r.png" alt="Error" /></a></p>
  <p><em>tsconfig.json</em></p>
  <pre><code>{
      &quot;include&quot;: [
          &quot;./src/**/*&quot;,
          &quot;./generated/**/*&quot;
      ],
      &quot;compilerOptions&quot;: {
          &quot;resolveJsonModule&quot;: true,
          &quot;target&quot;: &quot;es5&quot;,
          &quot;module&quot;: &quot;esnext&quot;,
          &quot;moduleResolution&quot;: &quot;node&quot;,
          &quot;lib&quot;: [
              &quot;dom&quot;,
              &quot;es6&quot;
          ],
          &quot;downlevelIteration&quot;: true,
          &quot;jsx&quot;: &quot;react&quot;,
          &quot;declaration&quot;: false,
          &quot;sourceMap&quot;: true,
          &quot;baseUrl&quot;: &quot;src&quot;,
          &quot;outDir&quot;: &quot;./dist/js&quot;,
          &quot;paths&quot;: {
              &quot;@generated/*&quot;: [&quot;../generated/*&quot;],
              &quot;api&quot;: [&quot;lib/api&quot;],
              &quot;api/*&quot;: [&quot;lib/api/*&quot;],
              &quot;asset/*&quot;: [&quot;lib/asset/*&quot;],
              &quot;base/*&quot;: [&quot;lib/base/*&quot;]
          },
          // Rules
          &quot;noImplicitAny&quot;: false,
          &quot;strictNullChecks&quot;: true,
          &quot;noImplicitThis&quot;: true,
          &quot;alwaysStrict&quot;: true,
          &quot;noUnusedLocals&quot;: true,
          &quot;noUnusedParameters&quot;: true,
          &quot;forceConsistentCasingInFileNames&quot;: true,
          &quot;esModuleInterop&quot;: true,
          &quot;isolatedModules&quot;: true
      }
  }
  </code></pre>
  <p><em>.eslint.json</em></p>
  <pre><code>module.exports = {
      env: {
          browser: true
      },
      settings: {
          &quot;import/parsers&quot;: {
              &quot;@typescript-eslint/parser&quot;: [&quot;.ts&quot;, &quot;.tsx&quot;]
          },
          &quot;import/resolver&quot;: {
              &quot;typescript&quot;: {
                  paths: &quot;./tsconfig.json&quot;,
                  alwaysTryTypes: true
              }
          },
      },
      parser: &quot;@typescript-eslint/parser&quot;,
      parserOptions: {
          tsconfigRootDir: &quot;.&quot;,
          sourceType: &quot;module&quot;,
          project: &quot;./tsconfig.json&quot;
      },
      extends: [
          &quot;plugin:import/recommended&quot;,
          &quot;plugin:import/typescript&quot;
      ],
      plugins: [
          &quot;@typescript-eslint&quot;,
          &quot;import&quot;
      ],
      overrides: [
          {
              files: [
                  &quot;src/_migration/**&quot;
              ],
              rules: {
                  &quot;import/no-restricted-paths&quot;: [
                      &quot;error&quot;,
                      {
                          basePath: &quot;./src&quot;,
                          zones: [
                              { target: &quot;./_migration&quot;, from: &quot;./&quot;, except: ['./_migration'] }
                          ],
                      },
                  ]
              }
          },
      ],
      rules: {
          &quot;import/no-unresolved&quot;: &quot;off&quot;,
          &quot;@typescript-eslint/typedef&quot;: [
              &quot;error&quot;,
              {
                  parameter: true
              }
          ]
      }
  };
  </code></pre>