I have not used .editorconfig that much, but would it makes sense to add the below?
[*]end_of_line = lf
-- Andreas Karlsson