Skip to content

refactor: enforce braces, two-param functions and 200-line files - #31

Merged
helderberto merged 1 commit into
mainfrom
refactor/structure-5-lint
Oct 24, 2026
Merged

helderberto merged 1 commit into
mainfrom
refactor/structure-5-lint

Conversation

@helderberto

Copy link
Copy Markdown
Owner

Context

Part 5 of 7, based on part 4. Puts the code rules (no inline ifs, at most two parameters, files under 200 lines) in ESLint so they hold without review.

Summary

  • ESLint for src/**/*.{ts,tsx}: curly: all, max-params: 2, max-lines: 200 (blank lines and comments skipped). Ten inline ifs get braces via --fix; no function had more than two parameters.
  • palette-list.tsx: the palette's result list as its own component, same markup and CSS module.
  • The palette component test splits into command-palette.test.tsx (rendering, opening, closing) and command-palette.search.test.tsx (search, keyboard, selection), sharing command-palette.test-utils.tsx.
  • resume-experience.ts: the experience list leaves resume-data.ts (was 244 lines), with tests that jobs and positions are listed newest first.

Evidence

  • Before: 12 lint errors under the new rules.
  • After: 0. 47 test files, 195 tests pass; no test removed. The ordering tests fail when a job or position is moved out of order.

Merge danger

Door: two-way

Blast radius: lint config


Generated by Claude Code

@vercel

vercel Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
website Ready Ready Preview Oct 24, 2026 10:56am UTC

@helderberto
helderberto force-pushed the refactor/structure-4-views branch from 385b394 to 52658e4 Compare October 24, 2026 10:54
Base automatically changed from refactor/structure-4-views to main October 24, 2026 10:55
ESLint now fails on one-line ifs (curly), functions with more than two
parameters (max-params) and files over 200 lines (max-lines). The
command palette's result list and the resume experience move to their
own files to fit, each with tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DZqAJbwwPeQSQFaPLDDSfr
@helderberto
helderberto force-pushed the refactor/structure-5-lint branch from 4b8afb3 to e504986 Compare October 24, 2026 10:55
@helderberto
helderberto merged commit 40b308e into main Oct 24, 2026
1 check was pending
@helderberto
helderberto deleted the refactor/structure-5-lint branch October 24, 2026 10:55

This branch was successfully deployed

1 active deployment
Preview — e5049865 Deployed Oct 24, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants