Add terminating newline to generated tsconfig.json

This commit adds a terminating newline to tsconfig.json
generated by `tsc --init`, just like `npm init`'s package.json.

The main reason I created this pull request is for editor friendliness.
Recently I created a new TypeScript project with `tsc --init`,
then I modified some compilerOptions and tried to git-commit the change,
but I found a newline was automatically added by my editor.

I think it's better that the default tsconfig.json template has a
terminating newline.
This commit is contained in:
r7kamura
2018-11-30 22:26:21 +09:00
parent 3d8668c3d4
commit 0f5121df9f
10 changed files with 10 additions and 10 deletions

View File

@@ -1893,7 +1893,7 @@ namespace ts {
}
result.push(`}`);
return result.join(newLine);
return result.join(newLine) + newLine;
}
}