Skip to content

Conversation

@david-crespo
Copy link
Collaborator

Before

After

What about the linter

I tried using https://typescript-eslint.io/rules/strict-boolean-expressions to catch this, but even with the following config I got 78 errors. It gets thrown off by types that are a union including null or undefined — doesn't seem to understand that they're nullable.

'@typescript-eslint/strict-boolean-expressions': [
  'error',
  {
    allowNumber: false,
    allowNullableNumber: false,

    allowString: true,
    allowNullableObject: true,
    allowNullableEnum: true,
    allowNullableBoolean: true,
    allowNullableString: true,
    allowAny: true,
  },
],

@vercel
Copy link

vercel bot commented Oct 30, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
console ✅ Ready (Inspect) Visit Preview Oct 30, 2024 4:44pm

@david-crespo david-crespo merged commit ca7f6e2 into main Oct 30, 2024
@david-crespo david-crespo deleted the pool-no-desc branch October 30, 2024 17:03
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.

2 participants