Do you want to request a feature or report a bug?
Feature
What is the current behavior?
The yarn.lock file is created with an unconfigurable, hardcoded indentation of 2 spaces.
https://github.com/yarnpkg/yarn/blob/19b09975e9900640a3b3070a1e05efc5184e9bef/src/lockfile/stringify.js#L90
What is the expected behavior?
The indentation style should be configurable to cover other numbers of spaces or tabs. Alternatively the indentation style should be inferred from the indentation style in package.json. The latter is the approach taken by npm in version 5:
https://github.com/npm/npm/blob/20589f4b028d3e8a617800ac6289d27f39e548e8/lib/shrinkwrap.js#L171-L185
Please mention your node.js, yarn and operating system version.
Node v8.5.0
yarn v1.1.0
OSX v10.12.6
Why is this important since the lock file is not intended to be modified by humans?
It's not really, but would provide a pleasing level of consistency across files.
I think having a fixed style would be nice for this file since it would prevent potential confusion or inconsistencies across projects or even inside different versions of the same project so I'm 馃憥 for a change like this.
That said I'd like to hear what @yarnpkg/core thinks.
I don't think this is something we should invest time in.
Closing since we don't intend to work on this and if this feature is implemented, it would bring unnecessary maintenance burden.
Most helpful comment
I think having a fixed style would be nice for this file since it would prevent potential confusion or inconsistencies across projects or even inside different versions of the same project so I'm 馃憥 for a change like this.
That said I'd like to hear what @yarnpkg/core thinks.