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

Merged
merged 4 commits into from
Aug 12, 2025
Merged

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.

Copy link
Contributor

Following you can find the validation changes against the target branch for the APIs.

No changes detected.

You can validate these APIs yourself by using the make validate target.

Copy link
Member

@pquentin pquentin left a comment

Choose a reason for hiding this comment

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

Merging as this is a good first step.

@pquentin pquentin merged commit 26fdeef into main Aug 12, 2025
8 checks passed
@pquentin pquentin deleted the no-native-structures-validation branch August 12, 2025 07:23
szybia added a commit that referenced this pull request Aug 12, 2025
* origin/main:
  [DOCS] Fix typos in the shared overlays file (#5124)
  Update specification output
  Remove unused EIS types (#5107)
  No native utility types validation lint (#4567)
  Document reindexing failures (#5031)
  Add dangling types to validation-errors.json (#5106)
  Update specification output
  Change `KeyedPercentiles` value type from `long` to `double` (#5108)
  [DOCS]: Add descriptions to API tags (#5098)
  Bump form-data and @redocly/cli in /docs/examples (#5074)
  Update specification output
  Adds cat-h values (#5096)
  Bump @eslint/plugin-kit from 0.3.3 to 0.3.4 in /specification (#5053)
  Update specification output
  [DOCS] Adds Ruby bulk helper to BulkRequest documentation (#5057)
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.

3 participants