Skip to content

Type checking library declaration files #5881

@leotm

Description

@leotm

Description

Follow-up to

Improve our TypeScript configuration
Skip declaration files from our dependencies
Reduce remaining static type errors
Begin path to fixing remaining (ts|tsx) errors

Screenshots

Before (670 errors)

"skipLibCheck": false /* Skip type checking of declaration files. */

670

After (556 errors)

# skipLibCheck
- false
+ true

556

To Reproduce

After

yarn tsc # locally
tsc # globally

Expected behavior

Reduced type errors excluding declaration files from our dependencies (node_modules)

Technical Details

Avoid cases of duplicate identifiers between global types in React Native vs Node
Suited to fuller repo's with more libraries

Next

  • Exclude type checking remaining TS files from remaining libs (node_modules)
  • Downgrade TypeScript to current ESLint-compat version (4.4.4)
  • Fix remaining type errors
  • TS check isn't working #4605 (CI + pre-commit)
  • Extend official React Native @tsconfig base
  • Upgrade ESLint for TypeScript 5
  • Upgrade to TypeScript 5
  • Fix husky pre-commit hook running lint-staged (should run yarn lint not `eslint)

References


Severity

  • Is this tech debt? ✅

cc @Cal-L @gantunesr

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions