Add an Editorconfig
I use trim spaces always in IDE, but it looks your project doesn't, also some other different standards exists and EditorConfig is support by many editors and will overwrite the settings for that project.
https://editorconfig.org/ Settings include Trim spaces, Last Empty line, use Tabs/spaces, indent size....
Supported Editors https://editorconfig.org/#download (some Editors need a Plugin, a lot integrated the EditorConfig into core).