-
Notifications
You must be signed in to change notification settings - Fork 17
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
[typescript] Turn on all of the recommended config options #213
Comments
I could take a look at this soon. What do you think about applying all of the TS config options marked as "recommended"? I'm not sure how many items there would be to fix with that turned on, but I could take a look at that while I'm in there. |
Hell yeah! Yes, 100%, the stricter the TS, the better. I'll modify the task to turn on all the recommended items. Feel free to fix the ones that are obvious (ideally in separate PRs that land before we turn on the rule), but also feel free to just ts-expect-error anything that isn't obvious. Or we can touch base and figure out how to change the code to turn on the various rules. |
I've got a PR to turn on the recommended settings. There was only one to add, and no violations in the codebase 😁 I'll do a separate PR for |
# fix: Add noUncheckedIndexAccess to tsconfig ## What - Adds the `noUncheckedIndexAccess` option to the base `tsconfig.json` file - Fixes the errors that appeared - Resolves isographlabs#213 ## How - Added line to the file - Fixed issues primarily by throwing errors, as each area of the code expects it to exist and something is very wrong if it doesn't - Loosened equality checks in some places so all falsey values are caught - Changed a few `null`s to `undefined`s because accessing an index that doesn't exist (or accessing an array with `undefined` as an index value returns `undefined`)
# fix: Add noUncheckedIndexAccess to tsconfig ## What - Adds the `noUncheckedIndexAccess` option to the base `tsconfig.json` file - Fixes the errors that appeared - Resolves isographlabs#213 ## How - Added line to the file - Fixed issues primarily by throwing errors, as each area of the code expects it to exist and something is very wrong if it doesn't - Loosened equality checks in some places so all falsey values are caught - Changed a few `null`s to `undefined`s because accessing an index that doesn't exist (or accessing an array with `undefined` as an index value returns `undefined`)
The text was updated successfully, but these errors were encountered: