Complete type safety across all JS/TS#105
Conversation
|
🌐 Preview URL: https://pr-105.frcsoftware.pages.dev |
fe9e60c to
a75619f
Compare
| const children = node.children; | ||
|
|
||
| // Look for images with hash attributes in URL | ||
| for (const child of children) { |
There was a problem hiding this comment.
if we have multiple images, I think there's a bug here where the first image could mistakenly get assigned the attributes of the second (or last) image in the set. I'm not quite sure of the desired behavior, but if you have thoughts I'd like to hear them.
There was a problem hiding this comment.
Where do you see this issue? The loop looks clean, unless I'm missing something
There was a problem hiding this comment.
Oof sorry, I responded yesterday but GitHub ate my comment.
Anyways, MRE is a situation where you have two images in the same paragraph. First image has no attributes, but the second check doesn't get applied since there's two children (images). Second image has attributes which get applied via the parent node. The bug here is that those attributes get applied to the first image too, the one which didn't have any attributes specified.
|
otherwise lgtm |
This PR bring us one step closer to complete type safety. Before, we weren't checking JavaScript files (including inline scripts in our starlight override components) which is bad 👍. Also set tsconfig preset to strictest.