Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: revert add typescript-strict-plugin to the payload package for incremental file-by-file migration [skip lint] #11226

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

GermanJablo
Copy link
Contributor

Reverts #11133

Unfortunately, typescript-eslint cannot communicate with typescript-strict-plugin, leading to desynchronization. This desynchronization can cause confusing errors. For example, TypeScript may request a non-null assertion, while ESLint deems it unnecessary and removes it on save via autofix.

Disabling typescript-eslint during the migration feels like a cure worse than the disease.

Another alternative I thought of is to use two tsconfig files: the main one and another for already migrated files in strict mode, but VSCode has no way to tell intellisense to use something other than tsconfig.json, such as tsconfig.typecheck.json. This would prevent IDE error detection, leaving us to discover issues in CI after PR failures—a potentially frustrating experience.

We may need to handle the migration the old-school way: make tsconfig strict, fix errors, and push changes without committing the tsconfig modifications until all errors are fixed. As I said in the original PR, the problem with that strategy is that new PRs may still introduce errors into files that were already fixed, but it is what it is.

Allocating sufficient time to the migration could help mitigate this issue. But that's something we'll have to weigh in our order of priorities.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant