Home Projects Portfolio Dashboard Export PDF Log in

Maintaining Code Quality: Streamlining Linting in bio-iglesia

Improving Developer Experience

In the bio-iglesia project, maintaining a clean codebase is essential to the long-term health of our React and Next.js infrastructure. Recently, we focused on refining our ESLint configuration to better enforce consistency across the application. Consistent tooling is the first line of defense in complex architectures like the one we use, ensuring that our adherence to Hexagonal Architecture remains readable and maintainable.

The Problem: Configuration Drift

As the project grew, small inconsistencies in syntax and styling began to creep in. These minor issues, while not breaking functionality, created "noise" in our pull requests. Relying on manual review to catch these patterns is an inefficient use of developer time.

The Solution: Standardizing Linting

We centralized our linting rules to ensure that every team member follows the same formatting standards. By fixing the ESLint configuration, we eliminated ambiguity in how components are structured, especially when dealing with the separation of concerns typical in our Hexagonal Architecture.

Example Configuration

module.exports = {
  extends: ['next/core-web-vitals', 'eslint:recommended'],
  rules: {
    'react/prop-types': 'off',
    'no-console': 'warn',
    'import/order': ['error', { 'newlines-between': 'always' }]
  }
};

This configuration ensures that imports are grouped logically, which is critical when navigating the layers of a hexagonal project structure. It reduces visual clutter and makes it easier to track dependencies.

Impact

By automating these checks, we achieve two major benefits:

  1. Reduced Cognitive Load: Developers no longer need to worry about formatting; the machine handles it.
  2. Clean Commits: PR history remains focused on functional changes rather than cosmetic adjustments.

Key Takeaways

  • Automate early: Linting and formatting rules should be established before a project scales.
  • Enforce consistency: Even in complex architectures like Hexagonal, standardizing syntax helps keep the abstraction layers clear.
  • Keep it simple: Use standard presets like next/core-web-vitals to avoid managing overly custom rulesets.

Generated with Gitvlg.com

Maintaining Code Quality: Streamlining Linting in bio-iglesia
Agustín Ibarrola

Agustín Ibarrola

Author

Share: