DEV Community

Discussion on: Confession: I Don't Know Where to Even Begin with Testing My Code

Collapse
 
vier31 profile image
Jan Schröder

One way to make that habit really stick is to set up ESLint to require PropTypes and implement a pre-commit hook with Husky to not allow commits as long as there are Linzer warnings. :)

In the beginning it feels really restrictive, but once you are used to it, writing out PropTypes takes a couple of minutes.