When changing files in GitHub online editor, it's hard to obey the formatting rules.
It would be nice to have a GitHub Action to format the code properly.
https://github.com/peter-evans/slash-command-dispatch can serve as a source of inspiration (peter-evans/slash-command-dispatch#11 in particular) - upon typing a command in the pull request comments it performs code formatting and pushes the fixes to the branch as a separate patch. Perhaps it can also amend instead.