Skip to content
This repository was archived by the owner on Jun 25, 2020. It is now read-only.

Commit f2c7a94

Browse files
committed
package.json files are no longer style formatted on save. These files are style formatted by for instance npm install, and additional style formatting would lead to unwanted commit changes
1 parent 802060d commit f2c7a94

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/source.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ bool Source::View::save() {
378378
if(Config::get().source.cleanup_whitespace_characters)
379379
cleanup_whitespace_characters();
380380

381-
if(format_style) {
381+
if(format_style && file_path.filename()!="package.json") {
382382
if(Config::get().source.format_style_on_save)
383383
format_style(true);
384384
else if(Config::get().source.format_style_on_save_if_style_file_found)

0 commit comments

Comments
 (0)