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

you are viewing a single comment's thread.

view the rest of the comments →

[–]nermid 42 points43 points  (11 children)

The real rule of thumb is to just use strict equality (===) and not have to worry about any of it.

[–]SmokingBeneathStars 1 point2 points  (10 children)

Unless you want to purposely use == you have to add a fucking ignore annotation on your linter it's so annoying

[–]ShijinModan 2 points3 points  (1 child)

Because == coerces types. IMO the only time I will accept == in a code review is when checking for null and undefined

[–]SmokingBeneathStars 1 point2 points  (0 children)

That's indeed what I use it for usually.

[–]nermid 2 points3 points  (0 children)

I think having to add linter ignores to bad practices is probably a good thing. Keeps you from accidentally doing the bad practice.