Lots of updates. I tried to keep them pretty contained into individual commits except for the second-to-last one where I was just dumping all of the edits into a large cleanup commit.
Basic rundown of stuff:
Update all dependencies to latest (it still works, so yay)
Set minimum Node.js to latest (v22) -- v16 reached end-of-life a couple of years ago.
Resolved all Gatsby deprecation warnings (except for Gatsby Head, which is a whole effort on its own)
Replaced deprecated Gatsby plugins -- there has been a change to its image processor which no longer allows for traced SVG placeholders, but these are not critical
Migrated eslint configuration
Resolved a large handful of annoying eslint warnings (e.g. they wanted functions written in a particular format) and turned some off. I didn't actually run eslint across the entire codebase though, that's an exercise for some future thing
Removed defaultProps in favor of default variables because React was warning this would be deprecated in future (and honestly I feel prop-types should be replaced by TypeScript, eventually)
Refactored the way props were spread through components to prevent props from accidentally turning into HTML attributes (if you looked in the rendered source you'd see things like <span conditions="[object Object"]>, which ugh)
Similarly -- props that controlled styled components would become HTML attributes, this can be resolved by naming props with a $, e.g. isActive={true} --> $isActive={true}
Other small bug fixes, like arrays of React components not having the correct keys
Lots of updates. I tried to keep them pretty contained into individual commits except for the second-to-last one where I was just dumping all of the edits into a large cleanup commit.
Basic rundown of stuff:
defaultProps
in favor of default variables because React was warning this would be deprecated in future (and honestly I feelprop-types
should be replaced by TypeScript, eventually)<span conditions="[object Object"]>
, which ugh)$
, e.g.isActive={true}
-->$isActive={true}