-
Notifications
You must be signed in to change notification settings - Fork 115
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
Conversation
flobernd
left a comment
There was a problem hiding this 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.
|
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 |
pquentin
left a comment
There was a problem hiding this 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.
* 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)
* hardcoded rule * a bit less hardcoded (still) * test (cherry picked from commit 26fdeef)
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
* hardcoded rule * a bit less hardcoded (still) * test (cherry picked from commit 26fdeef) Co-authored-by: Laura Trotta <[email protected]>
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.