react-eslint-plugin Rules I Like

Last updated

An ill-configured linter can slow you down, it might do more harm than good. Let Prettier handle formatting, the linter is for Actual (Potential) Problems©. This section in this post explains it better than I could: Don’t Get Distracted by Imaginary Problems — Overreacted

eslint-plugin-react is a nice ESLint plugin. It has been around for a while and accreted a lot of rules over the years. It has a lot of rules that are meant for class components and propTypes that are not that really relevant anymore.

There are some truly bizarre rules as well, like react/no-set-state, react/no-multi-comp (see this post) and react/jsx-one-expression-per-line.

Still it has valuable rules that I turn on by default. Here's my list, by category and roughly in order of importance: