Skip to content

Latest commit

 

History

History
5 lines (3 loc) · 290 Bytes

no-static-this.md

File metadata and controls

5 lines (3 loc) · 290 Bytes

no-static-this

Ban the use of this in static methods.

Rationale: It's pretty hard to wrap your head around the meaning of this in a static context. Especially newcomers will not recognise, that you are in fact referencing the class (or the constructor to be more precise).