• starman@programming.dev
    link
    fedilink
    English
    arrow-up
    6
    ·
    edit-2
    10 months ago

    I’d be surprised if there is a serious language that doesn’t come with at least some semi-official style guide.

    Does JavaScript have one?

    Edit: Except google’s style guide

    • Ephera@lemmy.ml
      link
      fedilink
      arrow-up
      6
      ·
      10 months ago

      Google’s, Mozilla’s and Apple’s style guides are pretty much as official as you’re gonna get here.

      The ‘prettier’ formatter is also rather popular and as such its stylistic choices, although that is of course moreso a hammer than a guide.

    • v0rld@lemmy.world
      link
      fedilink
      arrow-up
      4
      ·
      10 months ago

      Is JavaScript a serious language? /s

      Joking aside: One of Brendan Eich’s books probably contains something resembling a style guide.

    • sloppy_diffuser@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      3
      ·
      edit-2
      10 months ago

      Eslint rules and prettier. I use the AirBnB ruleset as a base close to my personal preferences and then customize to my liking.

      I don’t really have to do any manual formatting. I just save to apply the formatting.

      edit: javascript