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

#775: Enable strictNullChecks in IDE #2791

Closed
wants to merge 1 commit into from
Closed

Conversation

fregante
Copy link
Contributor

Alternative solutions:

Notes:

  • About 70% of files fail strictNullChecks
  • Throwing errors in the build without showing them in the IDE may just be frustrating
  • What we really need is the IDE to show us the errors so we can see them and iterate/fix them quickly

Things to keep in mind:

  • The IDE will show some red errors even if the build doesn't fail
  • We have a lot of red lines now (which don't have to be fixed immediately)

Given this, if we want to enable strictNullChecks we have no other choice at this moment. There's no "warning" level, there's no "partial project" setup that works in the IDE.

Last: Lint is failing because strictNullChecks enables new lint rules (which I can fix now) 🎉

@twschiller
Copy link
Contributor

Agree the ergonomics aren't great

Here'a another potentially approach for enabling incrementally: https://www.figma.com/blog/inside-figma-a-case-study-on-strict-null-checks/

Enabling the setting is going to require refactoring our types/contracts/control flow pretty significantly. At the current time, I want to use our developer ergonomics time to focus on testing/storybooking

@fregante
Copy link
Contributor Author

That's complementary to this and on its own it's not great DX.

This PR: the IDE shows warnings but the build won't fail (we're doing the same for some lint rules)

That article: the IDE is clean but then the build/PR fails on the second TypeScript run (and must be fixed, in a successive run, blindly because the IDE won't help). Also all new files will be loose and will continue to be loose until someone decides to make them strict later.

As for the priority: 👍

@fregante
Copy link
Contributor Author

fregante commented Mar 4, 2022

Closing this until we decide to start

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.

Incrementally enable TypeScript strictNullChecks
2 participants