-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
ref: Enable noUncheckedIndexedAccess
TS config
#12461
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
Conversation
size-limit report 📦
|
[requestHeaders, requestCookies] = _parseCookieHeaders('Cookie', request); | ||
[responseHeaders, responseCookies] = _parseCookieHeaders('Set-Cookie', response); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice refactor!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Bundle size hit doesn't look too bad (and even better if we can even it out with the no-unnecessary-conditions lint rule).
c2e6ade
to
cc029b0
Compare
|
||
console.log(`Installing typescript@${tsVersion}...`); | ||
|
||
execSync(`yarn add --dev --ignore-workspace-root-check typescript@${tsVersion}`, { stdio: 'inherit', cwd }); |
Check warning
Code scanning / CodeQL
Indirect uncontrolled command line
This PR enables the
noUncheckedIndexedAccess
TS config, ensuring that we always properly guard for array/object access.Sometimes, this leads to a bit of boilerplate, but enabling this def. found some places in the code where things could go wrong before.
Closes #12440
Afterwards, we can look into enabling https://typescript-eslint.io/rules/no-unnecessary-condition/.