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
Brendonovich
Brendonovich2y ago
Is it adding/removing a new line after the final bracket? Different editors and lint tools seem to have different preferences around this
cje
cjeOP2y ago
there is no empty line at the end of either version of the file
Brendonovich
Brendonovich2y ago
windows line endings maybe?
cje
cjeOP2y ago
yea thats what im thinking theres another weird thing where the package.json is ignored by turbo format && prettier --write *.{cjs,md,json}
Alex
Alex2y ago
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
Want results from more Discord servers?
Add your server