How I ensure quality in Node.js - Nasty typpos

The question of high-quality software has been with me since my university days. Some aspects depend on the project's objectives, while others remain an integral part of my value proposition: outstanding performance through excellence. Over the years, I've gained some insights and woven them into my tool chain. This time, it's about typos.

2 minutes

Over the years, one error has crept in that I never really took seriously: typos. As trivial as it sounds, a single character can jeopardize the entire stability of an application. And linting and TypeScript don't always manage to warn you in time. So, what to do?

That's why the cspell package has found its way into my Node.js tool chain. Thanks to this little helper, my source code is checked for correct English spelling by default. This includes log entries—which might seem like a nuisance, but for me, it's part of being careful—error messages, and variable and function names: in conclusion, every word in every line of source code. No typos mean one less potential source of errors.

The great thing about this tool is its configurability. I can add languages, for example German, to generate error messages in the backend and display them in the German frontend. Furthermore, there's a local dictionary of terms considered correct. This is especially useful for domain-specific terms or abbreviations that aren't standard in any dictionary.

To round things up, I've integrated this step into my hooks so that all relevant files are spell-checked before being pushed to the repository. So, before the code even leaves my computer, an automated process ensures that I haven't made any typos. Goodbye, scourge of broken applications because I misspelled miscellaneous.

How do you deal with typos? Have you had similar experiences in your software projects?

Tell me your story
call to action background image

Subscribe to my newsletter

Receive once a month news from the areas of software development and communication peppered with book and link recommendations.