Skip to content

refactor: apply the template numeric lint rules - #84

Merged
furedea merged 2 commits into
mainfrom
refactor/apply-numeric-lint
Oct 21, 2026
Merged

furedea merged 2 commits into
mainfrom
refactor/apply-numeric-lint

Conversation

@furedea-agent

@furedea-agent furedea-agent Bot commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

概要

template-typescript と同じ数値系 lint ルール(complexity 10,max-depth 2,max-params 3,max-lines 500)を .oxlintrc.json に追加し,既存の違反を振る舞いを変えないリファクタリングで解消しました.disable は追加していません.

Refs furedea/dotfiles#247

違反数

ルール 適用前 適用後
complexity 2 0
max-params 2 0
max-depth 1 0
max-lines 0 0
合計 5 0

受け入れ条件

  • template と同じ数値ルールを lint 設定に追加(template の lefthook には file-length コマンドが無いため,lefthook は変更なし)
  • 違反 0,説明のない disable なし
  • 振る舞いを保つ分割のみで,既存テストが通る
  • マージ前に Codex による adversarial review

詳細

  • src/integrations/esa.ts: isEsaPostSummary を hasEsaPostContent と hasEsaPostMetadata に分割.分割前に,検索結果の各フィールドが不正な場合に公開を拒否する振る舞いを固定するテストを src/integrations/esa.test.ts に追加.
  • src/data/article.ts: protectFencedBlocks をガード節で平坦化し,閉じフェンス判定を closesFence に抽出.convertCaptions の置換コールバックはキャプチャを rest 引数で受け取るように変更.
  • tests/performance/performance_report.ts: unitWithRange の median と samples を 1 つの引数オブジェクトにまとめた.

検証

  • pnpm check(format,lint,typecheck,test 125 件,knip,build,verify:build): 成功
  • lefthook run pre-commit --all-files: 成功
  • pnpm check:e2e: ローカルのサンドボックス内では preview サーバーへの接続がタイムアウトして実行できず.CI で確認する.

🤖 Generated with Claude Code

furedea and others added 2 commits October 21, 2026 12:46
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Enable complexity, max-depth, max-lines, and max-params as in
template-typescript, and split the violating functions without
changing behavior.

Refs furedea/dotfiles#247

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying furedea-com with  Cloudflare Pages  Cloudflare Pages

Latest commit: 6f5e60e
Status: ✅  Deploy successful!
Preview URL: https://74837a40.furedea-com.pages.dev
Branch Preview URL: https://refactor-apply-numeric-lint.furedea-com.pages.dev

View logs

@furedea
furedea merged commit fbadfb2 into main Oct 21, 2026
16 checks passed
@furedea
furedea deleted the refactor/apply-numeric-lint branch October 21, 2026 04:18
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.

1 participant