on-internet
← Community

How to solve `npm i package` and Vscode Default Formatter conflict

Stack Overflow ·

When I run npm i a-package package.json contains a new line at the end, but when I format that file with Json Language Feature the default json formatter of vscode, that line is removed. This causes unnecessary conflicts within our environment because we also formatOnSave config. If the last developer saved the package.json, the line gets removed, if they installed a package, the line comes back. There is an issue related to it: https://github.com/npm/npm/issues/18545 but it isn't solved and npm moved its cli to another repo. Json default formatter doesn't have an option to add a new line at t

Comments

Sign in or sign up to comment and upvote.

No comments yet.