Explicitly enable any usage in typescript in:
dev-packages, since those are largely integration and E2E tests. (This is done with the addition of a dev-packages/.eslintrc.js file.)
packages/*/test/, since those are all tests. (This is done with a rule override added to the root .eslintrc.js file.)
- 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
as casting, and adding type inference to the isInstanceOf method.)
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.
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
anyusage 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.)ascasting, and adding type inference to theisInstanceOfmethod.)In other places (ie, in exported production code paths), replace
anywithunknown, and upgrade the@typescript/no-explicit-anylint 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.