One of our longest-running client relationships had held onto a small jQuery footprint for years, a handful of legacy widgets nobody had prioritized replacing because they worked fine and touching them carried more perceived risk than benefit. This year, ahead of a broader modernization project, we finally finished removing it, closing out a piece of technical debt that had outlived several other, more dramatic changes to the same codebase.
What remained was mostly simple DOM manipulation the native DOM API has handled natively for years, toggling classes, showing and hiding elements, basic event delegation that modern browsers support without any library at all. None of it was doing anything jQuery was ever uniquely necessary for, even at the time it was originally written; it had simply never been revisited once the rest of the codebase moved on to more modern patterns elsewhere. That's a common shape for lingering jQuery in an otherwise modernized codebase: not a deliberate choice to keep using it, just a small corner nobody got around to touching.
The whole cleanup took under a week, a reminder that these long-deferred removals are usually smaller than they feel while they're being avoided. Part of what made it feel bigger than it was, before we actually started, was uncertainty about what exactly depended on the jQuery-based widgets and whether removing them might break something nobody remembered to test for. Once we actually traced through the affected pages, the scope turned out to be a handful of self-contained widgets with no deep entanglement in the rest of the application, which is often the real story behind long-deferred cleanup work: the avoidance is driven more by uncertainty about scope than by the actual size of the job.
We used the opportunity to add test coverage for the replaced widgets' behavior, since the original jQuery code had none, which was itself part of why nobody wanted to touch it for years. A change with no test coverage protecting it carries a kind of ambient risk that's hard to quantify but easy to feel, and that risk had been enough to keep this on the backlog through several planning cycles before this year's modernization project finally gave it a clear reason to get prioritized.
The broader modernization project this cleanup preceded went more smoothly for having this piece of legacy code out of the way first. A few of the newer patterns we introduced as part of that larger project would have interacted awkwardly with the old jQuery-based widgets had we left them in place, so sequencing the jQuery removal first, even though it wasn't strictly required by the modernization work, saved real friction later. It's a small case for tackling a boring, low-glamour cleanup task before the more exciting work it's adjacent to, rather than treating it as a separate item to get to eventually.