Lint and typecheck TypeScript #1276

Closed
NickGerleman wants to merge 2 commits from export-D45508576 into main

2 Commits

Author SHA1 Message Date
Nick Gerleman
0d2a3a92ac Lint and typecheck TypeScript (#1276)
Summary:
Pull Request resolved: https://github.com/facebook/yoga/pull/1276

This change starts to enlighten linting and other repo configuration to TypeScript. This was previously special-cased out of linting, and meant we were not linting everything. It is also a precondition to do real typechecking and linting our definitions with type information.

1. Add TypeScript dependencies
1. Configure ESLint, Babel, tsc for TypeScript
1. Run tsc as part of linting (OSS only for now)

This is continued in another change with adding types to scripts and config files, but more importantly converting hand-written tests and test generation to TypeScript, so we get real-world usage to typecheck against for testing.

Differential Revision: D45508576

fbshipit-source-id: ef5344b52c851d075194645d01d40b7507392a3c
2023-05-02 16:44:39 -07:00
Nick Gerleman
d1e7ad4b3a TypeScript fixes
Summary:
A pending change revamps a lot of how ESLint, Prettier, and Jest are configured in the repo, along with moving the world to TypeScript (and adding tsc usage).

That still needs some work to split up, but this change adds types used in our unit tests that I found were missing.

Differential Revision: D45506781

fbshipit-source-id: 984e055072f31e7d2e20f4fcb9c929b9356d2a57
2023-05-02 16:44:20 -07:00