Skip to content

Conversation

@mstange
Copy link
Contributor

@mstange mstange commented Sep 19, 2025

There are type-aware lints we can enable to catch more typescript things. no-unnecessary-condition would catch unnecessary null checks but it's a fair amount of work to get passing. This is some WIP towards that.

I filed microsoft/TypeScript#62468 for the newSelectedThreadIndexes.size false positive.

I'm not really sure why, but without this, TypeScript thinks that the state
can only have the values that it sees in the initialization value. It also
doesn't complain if setState is called with values that don't match the type
it inferred for the state member.

It needs to know that this.state can have other values than the initial value
if we want to avoid false positives from '@typescript-eslint/no-unnecessary-condition'.
Without these, it thinks that all of the possible keys are present.

Fixing this is needed if we want to avoid '@typescript-eslint/no-unnecessary-condition'
complaining about our 'prop in obj' tests.
@mstange mstange force-pushed the push-lnuxlrtpomym branch from e1439da to 1545249 Compare January 6, 2026 12:18
@codecov
Copy link

codecov bot commented Jan 6, 2026

Codecov Report

❌ Patch coverage is 95.74468% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.66%. Comparing base (1a808fe) to head (1545249).
⚠️ Report is 35 commits behind head on main.

Files with missing lines Patch % Lines
src/components/app/Home.tsx 50.00% 1 Missing ⚠️
src/components/shared/Warning.tsx 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5620      +/-   ##
==========================================
+ Coverage   85.64%   85.66%   +0.01%     
==========================================
  Files         313      313              
  Lines       31013    30998      -15     
  Branches     8535     8525      -10     
==========================================
- Hits        26562    26553       -9     
+ Misses       4021     4015       -6     
  Partials      430      430              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant