Cleaned up: zero ESLint findings across Future Mate and TattooMate
New features are visible right away; clean code isn't. Yet clean code is exactly what decides whether software stays stable, secure and maintainable in the long run. So we spent several evenings focused purely on code quality, for both the Future Mate website and TattooMate.
What is ESLint?
ESLint is a tool that automatically checks source code for common sources of errors. Examples include variables that are never used, unsafe type declarations, React components that re-render more often than needed, or links that bypass the Next.js router. Every finding points to a spot where something isn't quite as it should be.
Future Mate website: 993 -> 0
At the start, ESLint reported 993 problems (429 errors, 564 warnings). Most of them came from auto-generated database code, which is produced by a generator rather than written by us. We deliberately excluded that area from linting.
The rest concerned our own code and was fixed one by one:
- Loose types replaced: Where there used to be
any("anything can go here"), there are now proper types. Values from requests are validated before use instead of simply being passed through. - React used properly: Data is loaded in a way that avoids unnecessary render loops.
- Navigation via Next.js: Internal links now go through the router instead of full page reloads.
- Unused code removed: imports, variables and helper functions nobody used anymore.
Along the way we found a silent bug: changes to products in the admin area were never logged. The log rejected those entries without anyone noticing. That's fixed.
TattooMate: 184 -> 0
TattooMate had 184 warnings and no errors. Harmless at first glance, but this is exactly where working through them paid off. Behind some "unused variables" were real problems:
- A login check was fetched but never evaluated.
- The tooth form validated fields that were never filled in, so the form could not be submitted for minors.
These findings went straight into TattooMate 3.0.1.3. Without this lint cleanup, that update wouldn't exist in its current form. The full details of 3.0.1.3 are in the separate release post.
Beyond that, we:
- Resolved false positives properly: Images in the PDF consent forms use a dedicated PDF component that works differently from regular web images. Instead of silencing the warnings, we gave the component a clear name.
- Removed dead code paths: functions, types and an unnecessary database query in the newsletter reports.
- Stabilized loading: for attachments, tattoo images and support tickets.
What's next?
Both projects are at zero findings. To keep it that way, we now check all projects together with a single command. New findings show up immediately instead of quietly piling up.