Fix lint warnings, style fixups

Followup work for recent PRs
We have a lint rule internally about `invariant`'s second arg being a string literal. I'm not entirely sure *why* but I figured it's important enough to listen to.