このコミットが含まれているのは:
2026-07-05 20:00:58 +09:00
コミット 021d13a262
10個のファイルの変更647行の追加480行の削除
+36 -28
ファイルの表示
@@ -122,37 +122,44 @@ pass or the remaining failure is clearly blocked.
if the class cannot be statically detected.
- Do not introduce new UI libraries or production dependencies without approval.
## TSX formatting
## TypeScript and TSX formatting
- The delimiter-placement and line-breaking rules in this section apply to
both plain TypeScript `.ts` and TSX `.tsx`, unless a bullet explicitly says
it is JSX- or React-specific.
- Preserve compact TSX expression shapes such as inline ternary branches and
closing `</div>)` forms when nearby code uses them.
- Treat TSX formatting rules as hard constraints, not preferences. Before
finishing a TSX edit, inspect the edited hunks for closing `)`, `]`, and `}`
placement and fix violations instead of relying on formatter defaults.
- After every TSX edit, perform a style-only self-review of the edited hunks
before running verification or reporting completion. The task is not complete
while any edited TSX hunk violates these local formatting rules.
- The TSX self-review must classify every edited leading or trailing `)`, `]`,
and `}` by syntax role before deciding whether it is valid. Do not apply a
rule by glyph alone. A closing `)` for a function parameter list is different
from a closing `)` for a function call. A closing `}` for a block is different
from a closing `}` for an object, type literal, import list, or destructuring
pattern.
- The TSX self-review must confirm there are no common Prettier-style React
component declarations with a multi-line destructured parameter.
- The TSX self-review must confirm multi-line function declaration parameter
`)` placement follows the detailed parameter-list rules below.
- The TSX self-review must confirm call-expression `)` is never at the
- Treat TypeScript and TSX formatting rules as hard constraints, not
preferences. Before finishing a TypeScript or TSX edit, inspect the edited
hunks for closing `)`, `]`, and `}` placement and fix violations instead of
relying on formatter defaults.
- After every TypeScript or TSX edit, perform a style-only self-review of the
edited hunks before running verification or reporting completion. The task is
not complete while any edited TypeScript or TSX hunk violates these local
formatting rules.
- The TypeScript/TSX self-review must classify every edited leading or trailing
`)`, `]`, and `}` by syntax role before deciding whether it is valid. Do not
apply a rule by glyph alone. A closing `)` for a function parameter list is
different from a closing `)` for a function call. A closing `}` for a block
is different from a closing `}` for an object, type literal, import list, or
destructuring pattern.
- The TSX-specific self-review must confirm there are no common Prettier-style
React component declarations with a multi-line destructured parameter.
- The TypeScript/TSX self-review must confirm multi-line function declaration
parameter `)` placement follows the detailed parameter-list rules below.
- The TypeScript/TSX self-review must confirm call-expression `)` is never at
the beginning of a line.
- The TypeScript/TSX self-review must confirm
object/type/import/destructuring `}` is not at the beginning of a line.
- The TypeScript/TSX self-review must confirm multi-line
function/lambda/callback/block `}` is on its own line and never at the end
of the previous line.
- The TypeScript/TSX self-review must confirm array `]` is not at the
beginning of a line.
- The TSX self-review must confirm object/type/import/destructuring `}` is not
at the beginning of a line.
- The TSX self-review must confirm multi-line function/lambda/callback/block
`}` is on its own line and never at the end of the previous line.
- The TSX self-review must confirm array `]` is not at the beginning of a line.
- The TSX self-review must confirm JSX closing markers and closing parentheses
keep the surrounding compact style.
- The TSX self-review must confirm leading indentation follows 4-space logical
indentation with tabs only as leading 8-space compression.
- The TSX-specific self-review must confirm JSX closing markers and closing
parentheses keep the surrounding compact style.
- The TypeScript/TSX self-review must confirm leading indentation follows
4-space logical indentation with tabs only as leading 8-space compression.
- For long Tailwind `className` strings, wrap across lines only when needed.
- Keep continuation indentation aligned with the 4-space logical indentation
rule, using tabs only as leading 8-space compression.
@@ -215,7 +222,8 @@ pass or the remaining failure is clearly blocked.
### Delimiter decision table
Use this table before accepting any edited TypeScript or TSX hunk. The table is
more authoritative than formatter habit.
more authoritative than formatter habit. Unless a subsection explicitly
mentions JSX, it applies equally to `.ts` and `.tsx`.
#### Import and export named bindings