Force LF line ending on auto generated file next-env.d.ts on Windows

If I change the line endings of the file next-env.d.ts to LF, after a while the file automatically changes back to CRLF.
The file is auto generated by Next.js.
Webstorm on Windows 10.
Line separator in Settings > Editor > Code Style is set to "Unix and macOS (\n)".
Next.js seems to rewrite the file often, but is it possible to force its line endings to LF?

0
3 comments

I'm not aware of any way to do this

>Line separator in Settings > Editor > Code Style is set to "Unix and macOS (\n)".

This option works on file creation only and doesn't affect existing files

When do the line endings change - on file saving, or on code re-formatting, or on Git operations, or?

0
Avatar
Permanently deleted user

Thanks for your answer.

As far as I can see the line ending changes if I run next dev or next build.

0

I see... So it must be changed by Next.js...

0

Please sign in to leave a comment.