A sequence of one or more non-<newline> characters at the end of the file.
1. The Problem
I’ve heard people say that this non-POSIX compliant behavior could cause problems with software that expects all lines to end with a newline character.
I haven’t experienced this myself.
However, this does cause unnecessary diffs to be created when different editors are used to edit the same file.
For example, when saving file A, VS Code does not terminate the file with a newline.
If you then simply open and save this file without making any other changes using a POSIX-compliant editor like Vim, a final newline will be appended.
Now Git shows that there is a change.
This is silly.
2. The Solution
Add these settings to the .vscode/settings.json file in all of your repositories.
The files.insertFinalNewline setting is the most critical.
The others are nice to haves.