2

In Vue js semicolon is optional?

Comments
  • 8
    In JavaScript it is. But last time I checked (5 years ago) the code with semicolon is quicker.
  • 2
    @Codex404 nowadays it's the other way around, sadly.
  • 2
    Yes it's optional for 99.9% of the time
  • 9
    It is optional, but I will always leave an angry comment and deny your PR if you don't use it.
  • 2
    @Codex404 by only a couple of cycles. And even then, when ```npm run build``` is run you get it all minified which is one of those like two cases where you have to have semicolons

    in fact here's a fun little chart

    https://jsperf.com/asi-performance/...
  • 1
    it optional but prettier forces to remove by default, tbh i never questioned why :D
  • 0
    @PrivateGER if you deny my or over one optional semi colon, ima climb over cubicles and bitch slap you
  • 1
    Use strict;
  • 1
    @dUcKtYpEd And I will force an eslint pre-commit hook onto you to stop you from fucking up the minifier because you are unable to press one key per line more that literally requires no thinking.
  • 2
    I don't put semicolons. Discussions like this are for pitiful developers who focus more on whining than to actually do proper work for people. Just do your job, and make code easy to change. that's it.

    I like how some here feel superior by denying PRs just to bitch about semicolons. Seems like it's the only thing in life they control.
  • 0
    Here's a fun chat about it between Douglas Crockford (js core dev) and Jacob Thornton (bootstrap author) having a fun chat about it.
    Douglas is against no semis, while Jacob is in favor.
  • 0
    @bartmr or we write consistent code and all the code is using semicolons.
  • 0
    @PrivateGER we had a guy at my last company that snuck a lint checker into the pipeline. He eventually got fired. He’d reject all our senior’s PRs with hours worth of comments. Being too anal retentive with your team leads to resentment and eventual alienation. Seen it too many times
  • 0
    @bartmr it’s a generation of bitching. Reassign them to the QA team. Don’t need the consistent tension that comes with loud opinions. Especially over an optional syntax.
  • 1
    @dUcKtYpEd Enforcing consistent code and linting is something entirely different.
  • 1
    @dUcKtYpEd there is a difference between being an fucking ass and writing clean consistent code. If you don't want to adhere to the rules made you are an ass. Im 100% @PrivateGER will not be an ass about missing semicolons in PRs of a project which is currently not using semicolons.
    He might make a discussion with the team as to why he thinks semicolons are preferred.

    Personally (like many other JavaScript devs) have never worked without semicolons in my ten years of me writing JavaScript in collaboration with others.

    My boss sometimes forgets to adhere to his own conventions am I then being an ass to correct him on it or is he by just failing to follow the conventions he had written up?
  • 0
    @Codex404 > My boss sometimes forgets to adhere to his own conventions am I then being an ass to correct him on it or is he by just failing to follow the conventions he had written up?

    I do that as well if I'm working without eslint and autofixing
  • 0
    @inaba there is ESlint. And I understand it happens sometimes but I will tell you to fix it.
  • 0
    @Codex404 i don't really see a reason as to why you would waste your time doing eslints' job. But if that's what gets you off then 🤷 good for you I guess
  • 0
    @inaba he configured ESlint but he just ignores the errors (or doesn't see them) I don't tell him on a daily basis. Maybe once a month.
  • 0
    I just think there’s a gray line between enforcing what’s best for an application and destroying your teams moral and enthusiasm by being overly picky. Rejecting a PR, having it corrected and another PR made and then you finding the time to review it again is a 45minute process at the minimum and that’s if you have nothing else going on. With a full plate it can take days to get back around too and with that, a missed semicolon , perhaps on the end of a function should not result in the PR being rejected. My last startup I was a part of fell apart over processed we had. We had no moral nor ingenuity because of how deterred we were from committing code. What was missed due to my Ad hominem spirit yesterday 😂 was that there is a line and rejecting my PR over a missed semi colon let’s say after a function is crossing that line.
Add Comment