I have noticed in my debugging that the dopey typos which are hardest for me to find are as the result statements like:
if (id = userId) {..}
And for class methods:
let result = myClass.doThis;
For some reason VSCode doesn't flag these as potential problems at compile time. Is there a setting or a tool that would warn me about these sort of errors? Sometimes they are quite tedious to find and cost me quite a lot of time to track down because they aren't so obvious when you scanning and hard to search for.
I realize these are legal typescript statements but UIs in some other languages flag assignments inside conditionals and and methods called as properties to make sure that's really what you want to do.
object.memberwhereobjectis just some bag of properties. I almost never usethisexcept when frameworks compel me. Anyway, linters these days are highly customizable and I'm sure someone's written a rule like that already, but I thought I would give you my opinion in addition to recommending a tool because well... we are talking about linters :}