chore: fully type check packages/*/src files by JoshuaKGoldberg · Pull Request #117 · eslint/rewrite (original) (raw)

Prerequisites checklist

What is the purpose of this pull request?

Creates a root-level tsconfig.json that can type check all project files, along with a ci.yml step to do so in CI.

What changes did you make? (Give an overview)

This PR includes two common TypeScript practices for monorepos:

That root-level tsconfig.json is necessary for typed linting with the recommended typescript-eslint project service, as noted by @snitin315 and myself as a followup in #90 -> #90 (comment).

Also fixes a few type errors here and there. I'm posting comments in the PR.

Notably, this PR does not set up project references. Doing so requires touching files on disk, which I'm not confident enough in this repo to do on my own unprompted. Instead, the root-level tsconfig.json has noEmit: true so it's purely used for type checking.

Followup to #90, which is a PR. Would the team like me to file more granular issues? I wasn't sure how much the team wants some or all of this change. My intent is to continue enabling strict TypeScript flags after this, unless directed otherwise.

Is there anything you'd like reviewers to focus on?

I'm applying the practices I see as common + good in TypeScript-land, but am not totally sure I interpreted the existing repo setup right. Very much seeking to understand. 🙂