0

(There's a similar question asked >> Visual Studio - blank line at the end of each new file. But This is the complete opposite. And that doesn't answer this)

I have Visual Studio Code Version 1.19.0 on OSX. JavaScript (ES6) linter wants me to add a new blank line at the end of each file. When I hit save after adding a new blank line myself at the end of the file, VS Code removes that automatically. My concern is that, overriding any DEFAULT User Setting won't fix that.

Anyone with a solution? Thanks in advance.

(Setting I tried overriding but failed >> "files.insertFinalNewline": true)

1 Answers1

0

You can change the linter rule that enforces you to enter new line at the end so this will work

if you use ESlint you cab use the rul eol-last and set its value to "never"

in your .eslintrc file

{
"rules": {
   "eol-last" :"never"
   }
 }

learn more eol-last ESlint

mostafa tourad
  • 3,988
  • 1
  • 10
  • 18