Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It depends how aggressively your reformatter changes your code. For example, Prettier will take this JavaScript line:

  document.addEventListener('keydown', e => { console.log(e) });
and convert it to this, which changes both whitespace and syntax:

  document.addEventListener("keydown", (e) => {
    console.log(e);
  });
I don't think there are any diff tools that can hide the differences there, even though they're superficial.

[0] https://prettier.io/



You could try https://github.com/josephfrazier/prettier-diff , but it's inconvenient to ask members of your team to download an entirely separate diff tool


Oh, that's interesting. I didn't realize that existed. Thanks for the pointer!

Personally, I wouldn't want a niche diff tool globally wrapping my diff views. I'd worry too much about missing something important.

And I agree that it's also a tough sell to get your teammates to all use this one particular diff tool.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: