Skip to content

No native utility types validation lint #4567

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

l-trotta
Copy link
Contributor

To prevent the use of types such as Record, in favor of our aliases (e.g. Dictionary).
Originally this had to be less hardcoded and more about checking if a type was imported from our modules or from the typescript standard library, but so far I found no ways of achieving so.

@l-trotta l-trotta added the skip-backport This pull request should not be backported label Jun 13, 2025
Copy link
Member

@flobernd flobernd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's see if we can find a way to do this generically if possible. There are more types we want to avoid (e.g. Map).

Besides that we have builtins like "any" that should be disallowed and dictionary-like syntax contexts like:

{ [id: string] : SomeType; }

This is one of the harder validations and we can only try to make a best effort here. It probably wont ever be exhaustive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-backport This pull request should not be backported specification
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants