Thanks! I definitely agree that using a linter in any codebase is a must. You'll be happy to know that I used ESLint and Prettier in my project while preparing this article.
Linters will only go so far though, and they'll only catch the things that you configure them to.
For example, using the ESLint settings that react-scripts uses from create-react-app alongside my Prettier configuration, the only error caught in all of my code snippets above are the use of double quotes inside the curly braces in the fourth bad example.
Linters also won't be able to catch other code smells that only humans can see, such as bad variable names or confusing logic in the code. Ultimately it takes a human to ensure that the code is clean.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Nice tips!
Adding a linter to your project can also help , as I recognize many lint warnings/errors in your tips.
Thanks! I definitely agree that using a linter in any codebase is a must. You'll be happy to know that I used ESLint and Prettier in my project while preparing this article.
Linters will only go so far though, and they'll only catch the things that you configure them to.
For example, using the ESLint settings that
react-scripts
uses fromcreate-react-app
alongside my Prettier configuration, the only error caught in all of my code snippets above are the use of double quotes inside the curly braces in the fourth bad example.Linters also won't be able to catch other code smells that only humans can see, such as bad variable names or confusing logic in the code. Ultimately it takes a human to ensure that the code is clean.