Skip to content

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.

@github-actions
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)
pquentin pushed a commit that referenced this pull request Nov 7, 2025
* hardcoded rule

* a bit less hardcoded (still)

* test

(cherry picked from commit 26fdeef)
@pquentin
Copy link
Member

pquentin commented Nov 7, 2025

💚 All backports created successfully

Status Branch Result
9.1

Questions ?

Please refer to the Backport tool documentation

pquentin added a commit that referenced this pull request Nov 7, 2025
* hardcoded rule

* a bit less hardcoded (still)

* test

(cherry picked from commit 26fdeef)

Co-authored-by: Laura Trotta <[email protected]>
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.

4 participants