To your point, do it in a separate commit. Run the formatter/linter one time manually across the entire codebase. This will provide a basis (momentum) and from then on only changed files need to be formatted/linted (which could be automated).
We’re a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.