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

Switch on strictNullChecks and fix all issues #21075

Open
ibeckermayer opened this issue Jul 6, 2022 · 3 comments
Open

Switch on strictNullChecks and fix all issues #21075

ibeckermayer opened this issue Jul 6, 2022 · 3 comments
Labels
developer-experience Addressing these issues will improve the experience of developers working on Teleport refactoring ui

Comments

@ibeckermayer
Copy link
Contributor

See: https://www.typescriptlang.org/tsconfig/#strictNullChecks

@hatched
Copy link
Contributor

hatched commented Jul 6, 2022

I think we can take this one step further and work towards enabling strict. Doing so creates 1650 errors, 888 of which are strictNullChecks.

@ravicious
Copy link
Member

Some posts about performing a gradual migration that I found:

@JanKaczmarkiewicz
Copy link
Contributor

JanKaczmarkiewicz commented Jul 15, 2022

If we don't have circular dependencies between packages (package A installs package B and package B installs package A) we could use https://www.typescriptlang.org/docs/handbook/project-references.html

This way each package will have a separate tsconfig, so each package is compiled with different options so we can adopt strict mode package after package and option after option. Also, IDE understands that: we get errors from strict options only in enabled packages.

We used this approach (in prev company) some time ago to adopt a gradually strict mode big in monorepo project (~270k lines of code, 15 packages)

I could prepare the PoC branch if you want.

resources:

@hatched hatched transferred this issue from gravitational/webapps Feb 1, 2023
@hatched hatched added the ui label Feb 1, 2023
@ravicious ravicious added the developer-experience Addressing these issues will improve the experience of developers working on Teleport label Dec 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
developer-experience Addressing these issues will improve the experience of developers working on Teleport refactoring ui
Projects
None yet
Development

No branches or pull requests

4 participants