DEV Community

Discussion on: 🤬 What's your opinion on Linters, Prettiers, and Testers?

Collapse
 
ravavyr profile image
Ravavyr

Personally, I don't rely on linters or prettier. I see their usefulness, especially for newbies as they essentially hold your hand through formatting and writing clean code.

I think a lot of heavy programming veterans don't use these tools because they learned to code without them, long ago. Everyone has their habits and don't want to change them.

My reasoning for not using them is because i work on multiple projects across multiple platforms and often projects I did not originally create and in these situations it's best to code straight up, rather than rely on tools the original devs didn't use because automation is great until something breaks and you spend weeks debugging it.

In your situation your project was already underway and you tried to add these tools leading to various problems.

They are good when you start a project and use them from the get go. Once you set the rules and follow them, you're good to go, but integrating them into existing projects is often just a mess waiting to happen [as you've already learned]

So, should you use them?
Again, personal preference, i say No. Don't use them, force yourself to debug your code and format it properly. Do it every time you code and before long you format it automatically and you make a lot less mistakes because you're not relying on tools to help you.

Should you run tests on your code, sure, when done, when implementing it in a real world scenario to verify it works 100%.
I see plenty of testing tools where the devs tested things but didn't test it in the final real world scenario so all their tests were meaningless because the real scenarios failed. A lot of what runs on your local will fail on a live environment so you should always have a dev scenario that mimics production so you can really test things.
Also, code testing tools are nice but they don't test UI/UX and user experience is very important. If it's a web application, cross-browser responsiveness is absolutely necessary and tools can't test that. So, learn to test your code every time, so you can do it automatically as you work.

Use tools as needed, not just because they're popular or someone insists you must use them. Use them when you have a real reason to.