You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- If formatter output becomes a jagged staircase, refactor the expression instead of accepting the formatted shape.
115
-
- For function calls with config objects, compute complex fields above the call; keep object fields simple.
116
-
- Avoid dense inline plumbing: no nested ternaries, long `??` chains, or repeated `params.foo?.bar` inside argument objects.
117
-
- Prefer named intermediate values when a value has domain meaning, e.g. `channel`, `parentSessionKey`, `selectedModelRef`, `sourceProvider`.
118
-
- Code should read top-down: gather inputs, normalize/resolve, then call helpers.
114
+
- Formatter-friendly shape: when oxfmt explodes an expression vertically, extract named booleans, payloads, or small helpers. Do not change width or use format-ignore for local compactness.
115
+
- Calls should be boring: complex decisions happen above; call args/object fields are names, literals, or simple property reads.
116
+
- Prefer early returns over nested condition pyramids. Split code into gather -> normalize -> decide -> act.
117
+
- Use named intermediates only for domain meaning or readability; avoid temp-variable soup.
119
118
- Dynamic import: no static+dynamic import for same prod module. Use `*.runtime.ts` lazy boundary. After edits: `pnpm build`; check `[INEFFECTIVE_DYNAMIC_IMPORT]`.
0 commit comments