VS community used to have better line ending support in 2017 I think, particularly with Line Endings Unifier added,
but with 2019 I see no option to set line endings and so I think it uses windows (on windows) style by default which I would rather avoid and set linux everywhere to avoid conflicts, however is there no other option?
Too often I get inconsistent line ending warnings from Unity
There are several ways to do that. The best is probably to use an .editorconfig file, given it is now fully supported with VS2019 and setup end_of_line depending on the file extension.
If you are using git, I would also recommend to create a .gitattributes file to enforce rules with your git repo and to properly setup your git settings like core.autocrlf regarding auto-end-of-line transformations, so that everything is playing nicely between your IDE, your repo and your PR/review workflow.
Demo config I’m using to share a repo on my Mac and on my Window machines: (so that i’m using LF on Mac for cs files and CRLF on Windows thanks to git core.autocrlf):
ok thanks, though repo not git.
So there is no in-editor setting to enable for line ending format enforcement?
I know this is a much wished for feature - thus the Line Endings Unifier extension was born