• shasta@lemm.ee
    link
    fedilink
    arrow-up
    6
    ·
    4 months ago

    This is why I spend a good amount of time setting up linters on new repos before even starting to make the application. It saves a ton of time in peer reviews because no one has to think about formatting. Some people may not like the rules chosen but official direction from the boss is “get over it”. There are 0 comments on PRs about formatting which only ever annoys people and is a waste of good dev time.

    • waz@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      4 months ago

      On my current team, when we were trying to choose a style, my only input was “any style that can be checked/applied with a git commit hook.”

      I get some people prefer reading code in a particular format. Let them configure their editor to apply it, but let’s keep the version history in one unavoidably consistent style. Pretty please.

  • Australis13@fedia.io
    link
    fedilink
    arrow-up
    1
    ·
    4 months ago

    I felt that. I have a colleague whose coding style is different to mine and whenever they work on code that I originally wrote, I have to resist the temptation to modify things to camelCase.

    • mesamune@lemmy.world
      link
      fedilink
      English
      arrow-up
      3
      ·
      4 months ago

      Linters make these kind of things easier. Then you get mad at the tool rather than your coworker.

      • flashgnash@lemm.ee
        link
        fedilink
        arrow-up
        1
        ·
        4 months ago

        Does Prettier count as a linter?

        I always thought linters were more to find bad practice and possible errors than control the code style

        • Australis13@fedia.io
          link
          fedilink
          arrow-up
          2
          ·
          4 months ago

          Some linters can do both. Getting one set up as an automated job whenever code is pushed to the repo is on my TODO list…

      • jroid8@lemmy.world
        link
        fedilink
        arrow-up
        0
        ·
        4 months ago

        It IS fine, I though the comic was referring snake_case as disgusting. I was uncomfortable too at first but I got used to it

        • Croquette@sh.itjust.works
          link
          fedilink
          arrow-up
          2
          ·
          3 months ago

          I used to be a PascalCase guy myself, but that changed recently when I had to use React (coming from embbeded C)

          I am working with a C embedded framework that uses snake_case, and switching between the two, I realized that it is a lot easier to find information with snake_case for me.