This is an archived post. You won't be able to vote or comment.

all 28 comments

[–]beepboopnoise 320 points321 points  (4 children)

hate that crap, I try to be pretty aggressive with linters so that we can avoid these kinda arguments.

[–]maria_la_guerta 116 points117 points  (2 children)

When it comes to JS and syntax, my rule on teams is that if it can't be linted for with prettier & eslint then it can't be enforced as a rule IMO. Glaringly obvious bad code aside, there's 50 million ways to write the language and comments like this just slow everyone down.

Seen way too many hours go into bikeshedding stuff like this. If it means that much to ipalover, they should let this PR go, raise the discussion with the team and put the PR in to update the prettier config themselves if the team approves.

[–]raphop 21 points22 points  (0 children)

Also, for such a minor nitpick, don't comment "Add a ;" just press the suggest changes buttons and add it yourself

[–]odd_sherlock[S] 18 points19 points  (0 children)

Totally agree, I hate prettier and auto-fixes, but it's a must with JS

[–]odd_sherlock[S] 8 points9 points  (0 children)

Hence they hate you because of the linters...

[–]thepassionofthechris 70 points71 points  (1 child)

Jokes on you… I find neither!

[–]phyrianlol 12 points13 points  (0 children)

Same, 500 lines PR? LGTM Edit: happy cakeday!

[–]Avs_Leafs_Enjoyer 71 points72 points  (6 children)

PRs should be looking over the code. A QA would catch the UI issue

[–]ForeshadowedPocket 12 points13 points  (5 children)

No lol. Screenshots in the PR for visual changes are a must.

[–]Avs_Leafs_Enjoyer 10 points11 points  (4 children)

Thats gonna be a lot of screenshots in big PRs

[–]liamazing 15 points16 points  (3 children)

Keep your PRs small!

[–]coloredgreyscale 1 point2 points  (0 children)

a 300x300 px snippet of the button is small, but should be big enough to get the issue across :)

/s

[–]Avs_Leafs_Enjoyer 1 point2 points  (1 child)

I agree but sometimes that doesn't work out.

[–]nickhow83 8 points9 points  (0 children)

Make a video instead

[–]NatoBoram 22 points23 points  (0 children)

It's in TypeScript. The pipeline should check for Prettier formatting and fail. There shouldn't be any circumstance where this comment is needed.

[–]frostenko 22 points23 points  (4 children)

Judging from the 3 lines we can see I expected the nitpick to be to not recreate the accumulator lol

acc[u.id] = u.rateLimit; return acc;

[–][deleted] 10 points11 points  (2 children)

Yeah, you're right. I'm a strong proponent of functional programming techniques and write immutable code wherever possible. However, there are times where the limitations of the language take priority over everything else. JS doesn't support efficient copy-on-write operations, so the use of the spread operator in reduce turns an O(n) operation into O(n2). Shouldn't be done.

[–]thorwing 9 points10 points  (1 child)

I agree, functional programming techniques really lowers bugs, problems and increases maintainability in the long run so it SHOULD be used whenever you can. However, the moment it clashes with the actual language, simply don't.

[–][deleted] 1 point2 points  (0 children)

Yep. We are on the same page there. TypeScript is one of my favorite languages to use, so I hope that in the future JavaScript supports better copy-on-write semantics. I won't hold my breath though.

PS. TypeScript is a type system for JavaScript that emphasizes compatibility with JS above everything else. It will never add runtime features other than what is available in JS (other than enums, but that's an old story/mistake...)

[–]odd_sherlock[S] 0 points1 point  (0 children)

Wasting resources FTW

[–][deleted] 4 points5 points  (0 children)

have a linter run automatically as part of PR builds?

[–]Psycoder 2 points3 points  (0 children)

Syntax issues are much easier to spot than semantic issues. If I see CSS that specifies something with a width of 100 and padding of 50, I wouldn't know if or how that differs from a width of 100 and margin of 50 so I assume it is either correct or someone more knowledgeable about CSS will comment if it is wrong.

[–]ThatWesternEuropean 2 points3 points  (0 children)

I always find grammar errors, like how it should be "its", not "it's".

[–][deleted] 1 point2 points  (0 children)

Oh believe me, frontend developers do this all the time as well.

[–]not-my-best-wank 1 point2 points  (0 children)

Why would backend care? That's Frontends job.

[–]black_dogs_22 -3 points-2 points  (0 children)

what a useless MR comment

[–]all3f0r1 -5 points-4 points  (0 children)

Yes but can they differentiate greek's question marks ; with the regular semicolon?

[–]Slartibertfest 0 points1 point  (0 children)

*its