0no-co / GraphQLSP

TypeScript LSP plugin that finds GraphQL documents in your code and provides diagnostics, auto-complete and hover-information.
https://gql-tada.0no.co
MIT License
332 stars 13 forks source link

fix(graphqlsp): Fix unchecked index accesses #335

Closed kitten closed 3 weeks ago

kitten commented 3 weeks ago

Updates tsconfig to enable noUncheckedIndexedAccess.

This is because there's several cases where it's hard to keep track of where the AST could have an optional entry in an array, that was previously assumed to exist, e.g. function arguments. This enables this option then addresses all errors to eliminate crashes where we previously didn't check arrays on the TS AST.

changeset-bot[bot] commented 3 weeks ago

🦋 Changeset detected

Latest commit: f8bf406779d91e6fff24ae601444054ffce9fa85

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ----------------- | ----- | | @0no-co/graphqlsp | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR