why is there a diff in last line of package.json?
I've noticed that I fairly often get the last line of package.json included in diffs even though it hasn't changed. Anyone know why / how it can be prevented?
5 Replies
Is it adding/removing a new line after the final bracket? Different editors and lint tools seem to have different preferences around this
there is no empty line at the end of either version of the file
windows line endings maybe?
yea thats what im thinking
theres another weird thing where the package.json is ignored by
turbo format && prettier --write *.{cjs,md,json}
If you are using prettier maybe the package.json gets formatted with a specific end of line (eol). And maybe your git/editor or whatever always overrides this