microsoft / beachball

The Sunniest Semantic Version Bumper

Home Page:https://microsoft.github.io/beachball

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Change indentation

Netail opened this issue · comments

Hi team Beachball,
Would it be possible to change the JSON indentation?
Currently the indentation is set to 2 spaces

fs.writeJSONSync(info.packageJsonPath, packageJson, { spaces: 2 });
but wouldn't be nice to make this an option to e.g. change to 4. Maybe a dynamic indentation; use current indentation if file exists else use root package.json indentation

Context: We use 4 spaces within our company and beachball resets the CHANGELOG.json & package.json formatting to 2 spaces and then our formatters change it to 4 again. And it goes back-and-forth like that :(

@kenotron @ecraig12345 What you guys think of the related pull request? Something like 'auto' could be added in the future?