From 8e29be9c1c04fe95af3011ca2f79ff47ec7bd0a3 Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Sat, 10 Jan 2026 12:29:07 -0500 Subject: [PATCH] Add let chains preference to development guidelines (#22497) --- CLAUDE.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CLAUDE.md b/CLAUDE.md index 9ed589bf29..fd0b794b5d 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -68,3 +68,4 @@ When working on ty, PR titles should start with `[ty]` and be tagged with the `t - Always run `uvx pre-commit run -a` at the end of a task. - Avoid writing significant amounts of new code. This is often a sign that we're missing an existing method or mechanism that could help solve the problem. Look for existing utilities first. - Avoid falling back to patterns that require `panic!`, `unreachable!`, or `.unwrap()`. Instead, try to encode those constraints in the type system. +- Prefer let chains (`if let` combined with `&&`) over nested `if let` statements to reduce indentation and improve readability.