-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Description
Note
The pull request "chore(lint): prefer 'unknown' to 'any', fix lint warnings" was created by @isaacs but did not reference an issue. Therefore this issue was created for better visibility in external tools like Linear.
Explicitly enable any usage in typescript in:
dev-packages, since those are largely integration and E2E tests. (This is done with the addition of adev-packages/.eslintrc.jsfile.)packages/*/test/, since those are all tests. (This is done with a rule override added to the root.eslintrc.jsfile.)- Several one-off allowances, generally for vendored types from third party sources, and cases involving method overwriting that TypeScript can't follow. (These are done with file/line overrides, explicit
ascasting, and adding type inference to theisInstanceOfmethod.)
In other places (ie, in exported production code paths), replace any with unknown, and upgrade the @typescript/no-explicit-any lint rule to an error.
This silences a lot of eslint warnings that were habitually ignored, and encourages us to not opt out of strict type safety in our exported code.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels