Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type instantiation is excessively deep and possibly infinite #485

Open
maxdzin opened this issue Mar 19, 2024 · 2 comments
Open

Type instantiation is excessively deep and possibly infinite #485

maxdzin opened this issue Mar 19, 2024 · 2 comments

Comments

@maxdzin
Copy link

maxdzin commented Mar 19, 2024

This plugin attempts to be a great help with making the code clear, so first of all, I want to thank you for creating it.

There's a problem now when using this plugin. Starting from version 3.0.0-next.2 and up to the current 3.0.0-next.7 it caused typecheck command to fail with an error:
error TS2589: Type instantiation is excessively deep and possibly infinite.

Please, note that before next version it was working properly and didn't inflict such a thing.

Tell us about your environment

  • ESLint version: 8.57.0
  • eslint-plugin-vue version: -
  • eslint-plugin-vue-i18n version: 3.0.0-next.7
  • Node version: 20.11.1

Please show your full configuration:

I prepared the reproduction repository with a couple of branches with different configurations (see below).

What did you do?

Just try to use some translation in a vue file template:

<template>
  <div>
    <span>{{ $t('app.intro.title') }}</span>
  </div>
</template>

What did you expect to happen?
Everything works well and running typecheck didn't show the mentioned error.

What actually happened?

When launching pnpm typecheck it fails with an error:

error TS2589: Type instantiation is excessively deep and possibly infinite.

Please, note that even without specifying the plugin in eslint configuration or even without eslint setup in project at all, it caused typecheck to fail - just by having the plugin installed as a dev dependency (see the initial branch of reproduction repository for that case).

Repository to reproduce this issue

As mentioned, I created a repository with a couple of branches for several configurations:

Launching pnpm typecheck in any of the branches above fails with an error.

@ferferga
Copy link

This is an issue with your setup. Check intlify/bundle-tools#272 and intlify/vue-i18n-next#1119 (comment)

This is not an ESLint error, since TypeScript doesn't have anything to do with ESLint.

@maxdzin
Copy link
Author

maxdzin commented Mar 27, 2024

This is not an ESLint error, since TypeScript doesn't have anything to do with ESLint.

There's something wrong when using this plugin with @nuxtjs/i18n module, but not only. As I stated above, the problem appears even with just simply installing this plugin as a dependency.
I'm not yet sure what is wrong there exactly, since I haven't time to check that deeply yet.

@ferferga thank you for the links, I'll try to check that later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants