Skip to content

chore: 設定ファイル集約と依存関係の最新化#56

Merged
9c5s merged 7 commits intomainfrom
chore/config-consolidation
Mar 28, 2026
Merged

chore: 設定ファイル集約と依存関係の最新化#56
9c5s merged 7 commits intomainfrom
chore/config-consolidation

Conversation

@9c5s
Copy link
Copy Markdown
Owner

@9c5s 9c5s commented Mar 28, 2026

Summary

ルートの設定ファイル14個を7個に削減し、開発ツールの依存関係を最新化する。

  • 6つの設定ファイル (.prettierrc.js, .prettierignore, .textlintrc.json, commitlint.config.mjs, tsup.config.ts, .markdownlint-cli2.jsonc) を package.json にインライン化
  • vitest.config.tsvitest.e2e.config.ts を vitest projects で1ファイルに統合
  • prettier v2→v3, eslint v9→v10, tsc→tsgo にアップグレード
  • .gitignore の不要エントリ削除 (.turbo/, 旧設定ファイルの例外)、.tmp/ 追加

依存関係の変更

パッケージ 変更
prettier ^2.2.1^3.8.1
eslint ^9.39.4^10.1.0
@eslint/js ^9.39.4^10.0.1
eslint-plugin-jsdoc ^62.8.0^62.8.1
@typescript/native-preview 新規追加 (tsgo)

削除されたファイル

.prettierrc.js, .prettierignore, .markdownlint-cli2.jsonc, .textlintrc.json, commitlint.config.mjs, tsup.config.ts, vitest.e2e.config.ts

Closes #44

Test plan

  • npm run typecheck (tsgo)
  • npm run build (tsup from package.json)
  • npm run test (vitest workspace, 189テスト全PASS)
  • npm run lint:ts (eslint v10)
  • npm run format:check (prettier v3)
  • npm run lint:md (markdownlint from package.json)
  • npm run lint:text (textlint from package.json)
  • npm run docs (typedoc)
  • lefthook pre-commit フック全PASS

9c5s added 6 commits March 28, 2026 23:41
v2.2.1 -> v3.8.1。jsoncファイルの末尾カンマがtrailingComma: "all"
に従って追加された(2ファイル)。
vitest v4のprojects APIを使い、unitとe2eの設定を
vitest.config.tsにインライン定義で統合する。
--project フラグで個別実行が可能になり、
vitest.e2e.config.tsは不要になったため削除する。
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 28, 2026

⚠️ No Changeset found

Latest commit: 2c00612

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 28, 2026

Summary by CodeRabbit

リリースノート

  • Chores
    • 開発ツール設定を整理・統合し構成を簡素化しました(フォーマット・リンティング・コミット設定含む)
    • 開発用依存パッケージを更新しました
    • 型チェックとテストコマンドを見直しました
    • テスト実行のプロジェクト分離を導入し、ユニットとE2Eの管理を改善しました
    • 一時ファイルやビルド出力の無視ルールを調整しました

Walkthrough

リポジトリのツール設定を集約・整理し、複数の個別設定ファイルを削除または統合、Vitest をプロジェクト化(unit / e2e)し、型チェックを tsc から tsgo へ切り替えるなどの構成変更を行いました(設定の移動と削除が主な差分です)。

Changes

Cohort / File(s) Summary
設定ファイル削除・統合
./.markdownlint-cli2.jsonc, ./.prettierrc.js, ./.textlintrc.json, ./commitlint.config.mjs, ./tsup.config.ts, ./vitest.e2e.config.ts
個別のルール/設定ファイルを削除。これらの設定は repository-level の package.json へ統合されたか廃止されています。
package.json 更新
package.json
format:check 等のスクリプト修正、Vitest スクリプトを `--project unit
Vitest 再構成
vitest.config.ts
test.projects を導入して "unit""e2e" のプロジェクト定義を追加。e2e 用の include/globalSetup/testTimeout/sequence 設定を統合。
.gitignore / .prettierignore 変更
.gitignore, .prettierignore
.gitignore で一部明示的な非無視解除を削除し .tmp/ を追加、.turbo/ の扱いを変更。.prettierignore の複数エントリを削除。
軽微なフォーマット調整
.changeset/.markdownlint.jsonc
JSON 記述の微修正(末尾カンマ追加)でルール自体の内容は変更なし。

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related issues

Possibly related PRs

  • PR #8 — 本PRが削除する .markdownlint-cli2.jsonc.textlintrc.jsoncommitlint.config.mjs 等を当該 PR が追加しており、設定差分が直接競合/関連しています。
  • PR #42 — Vitest の E2E 設定の統合/分割に関する変更が重複しており、テスト設定の扱いで密接に関連します。
  • PR #49 — package.json のスクリプトや Vitest 関連の変更が重複しており、ツーリング設定の整理という観点で関連性があります。
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Out of Scope Changes check ❓ Inconclusive prettier v2→v3、eslint v9→v10の升格やコンフィグファイル統合は、Issue #44の「ビルドパイプライン統合」の範囲内の関連最新化と言えますが、PR説明では「開発ツール依存の最新化」として独立した変更として記載されています。 prettier/eslintの升格が#44の厳密な要件外の可能性があるため、これらの変更がPRの主目的に対して本当に必要であるかを確認してください。
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed PRタイトルは「設定ファイル集約と依存関係の最新化」と、変更内容の主要なテーマを明確に説明しており、チェンジセットの主要な変更を要約しています。
Description check ✅ Passed PR説明は変更内容(設定ファイルの統合、依存関係の更新、tsgoへの移行)、削除ファイル、テスト検証について詳細に関連情報を記載しており、チェンジセットに関連しています。
Linked Issues check ✅ Passed Issue #44の主要要件(tsgoの導入と型チェックパイプラインの統合)はPRで実装されており、package.jsonへの@typescript/native-preview追加、tsc→tsgoへの移行、npm run typecheckスクリプトの変更が確認できます。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

📋 Issue Planner

Built with CodeRabbit's Coding Plans for faster development and fewer bugs.

View plan used: #44

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/config-consolidation

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request consolidates various tool configurations (Commitlint, Markdownlint, Textlint, Tsup, and Prettier) into package.json and updates several development dependencies, including ESLint and Prettier. The testing infrastructure is refactored to utilize Vitest projects for unit and E2E tests, and the type-checking command is updated to use tsgo. I have no feedback to provide.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@package.json`:
- Line 50: The `@typescript/native-preview` dependency in package.json is using a
caret range (^7.0.0-dev.20260328.1) which can pull future preview updates and
change type-check results; change the entry for "@typescript/native-preview" to
a strict pinned version (remove the ^ and keep the exact version string
"7.0.0-dev.20260328.1") so the package manager installs that exact preview
release and ensures reproducible type behavior.

In `@vitest.config.ts`:
- Line 14: The projects-level Vitest config is using an unsupported option:
remove the invalid "reporters: [\"verbose\"]" entry from the projects
configuration in vitest.config.ts; instead, make the E2E runner use verbose
output by adding the CLI flag in the npm script (e.g. update the "test:e2e"
script to include --reporter verbose) or set root-level test.reporters if you
want global reporters; target the "reporters" key in the projects block and the
"test:e2e" npm script when making these changes.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: d9228706-baf2-4011-93e2-4b9e9e4f9189

📥 Commits

Reviewing files that changed from the base of the PR and between 0a1ddcc and b757e9a.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (11)
  • .changeset/.markdownlint.jsonc
  • .gitignore
  • .markdownlint-cli2.jsonc
  • .prettierignore
  • .prettierrc.js
  • .textlintrc.json
  • commitlint.config.mjs
  • package.json
  • tsup.config.ts
  • vitest.config.ts
  • vitest.e2e.config.ts
💤 Files with no reviewable changes (7)
  • .markdownlint-cli2.jsonc
  • .prettierignore
  • .textlintrc.json
  • tsup.config.ts
  • commitlint.config.mjs
  • .prettierrc.js
  • vitest.e2e.config.ts
📜 Review details
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2026-03-24T19:15:37.273Z
Learnt from: 9c5s
Repo: 9c5s/node-tcnet PR: 41
File: src/utils.ts:94-94
Timestamp: 2026-03-24T19:15:37.273Z
Learning: In node-tcnet’s src/utils.ts, the project targets ES2022 with NodeNext and intentionally does not support Node.js 18.0.0. Therefore, you should not add defensive handling for the temporary numeric `family` field (4/6) in `os.networkInterfaces()` that appears in Node 18.0.0 and is fixed starting in 18.1.0. Avoid reintroducing numeric-family handling logic in this codepath since it is unnecessary for the supported runtime versions.

Applied to files:

  • .gitignore
📚 Learning: 2026-03-20T23:04:42.120Z
Learnt from: 9c5s
Repo: 9c5s/node-tcnet PR: 1
File: lefthook.yml:20-28
Timestamp: 2026-03-20T23:04:42.120Z
Learning: In the `node-tcnet` repository's `lefthook.yml`, `bunx` (Bun's package runner) is intentionally used instead of `npx` for `actionlint`, `zizmor`, and `lefthook` commands because: (1) the `actionlint` npm package is only a stale wasm wrapper (last release Dec 2022) and is not executable via `npx`; (2) `zizmor` has no npm package and is only available via PyPI, Cargo, or system package managers; (3) `lefthook` is a Go binary whose npm wrapper has low reliability. `bunx` is the correct and practical choice for these tools in this project.

Applied to files:

  • package.json
🔇 Additional comments (4)
.changeset/.markdownlint.jsonc (1)

2-2: 問題なし(表記統一として妥当です)。

Line 2 の変更は JSON 形式の統一に留まっており、first-line-heading ルール無効化の意図も明確です。

.gitignore (1)

27-29: .tmp/ の追加は妥当です。

一時ファイルの管理として適切で、既存ルールとの衝突もなく問題ありません。

vitest.config.ts (1)

6-13: projects 統合の構成は明確で良いです

unite2e の責務分離、E2E の include / globalSetup / testTimeout / 逐次実行設定が整理されていて、設定の見通しが改善されています。

Also applies to: 15-18

package.json (1)

31-40: スクリプト整理と設定集約の方向性は妥当です

Vitest の --project 運用への移行と、各種ツール設定の package.json 集約により、設定点が減って保守しやすくなっています。

Also applies to: 70-125

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@package.json`:
- Around line 48-53: Add an "engines" field to package.json at the top-level to
declare the Node.js version requirement required by ESLint 10; set engines.node
to ">=24.0.0 || ^22.13.0 || ^20.19.0" (or equivalent range string per semver) so
consumers and contributors know the supported Node versions—edit the
package.json root object and add the "engines" key with the Node constraint
string.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: db69bc1b-9ef0-4ec2-88a4-94202b6b4907

📥 Commits

Reviewing files that changed from the base of the PR and between b757e9a and 2c00612.

📒 Files selected for processing (2)
  • package.json
  • vitest.config.ts
📜 Review details
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: 9c5s
Repo: 9c5s/node-tcnet PR: 56
File: package.json:50-50
Timestamp: 2026-03-28T15:19:16.430Z
Learning: In the `node-tcnet` repository (`package.json`), `typescript/native-preview` (tsgo) is intentionally specified with a caret range (e.g., `^7.0.0-dev.20260328.1`) rather than a pinned version. The rationale is that this is a daily-released preview package where pinning would become stale the next day; reproducibility is ensured via `npm ci` + lockfile instead. Do not suggest strict version pinning for this dependency.
📚 Learning: 2026-03-28T15:19:16.430Z
Learnt from: 9c5s
Repo: 9c5s/node-tcnet PR: 56
File: package.json:50-50
Timestamp: 2026-03-28T15:19:16.430Z
Learning: In the `node-tcnet` repository (`package.json`), `typescript/native-preview` (tsgo) is intentionally specified with a caret range (e.g., `^7.0.0-dev.20260328.1`) rather than a pinned version. The rationale is that this is a daily-released preview package where pinning would become stale the next day; reproducibility is ensured via `npm ci` + lockfile instead. Do not suggest strict version pinning for this dependency.

Applied to files:

  • package.json
📚 Learning: 2026-03-24T19:15:40.455Z
Learnt from: 9c5s
Repo: 9c5s/node-tcnet PR: 41
File: src/utils.ts:94-94
Timestamp: 2026-03-24T19:15:40.455Z
Learning: In the `node-tcnet` repository (`src/utils.ts`), the project targets ES2022 + NodeNext and does not need to support Node.js 18.0.0. The temporary numeric `family` field (4/6) in `os.networkInterfaces()` introduced in Node.js 18.0.0 and fixed in 18.1.0 does not need to be handled. Suggesting numeric `family` handling for defensive programming is unnecessary for this project.

Applied to files:

  • package.json
📚 Learning: 2026-03-20T23:04:42.120Z
Learnt from: 9c5s
Repo: 9c5s/node-tcnet PR: 1
File: lefthook.yml:20-28
Timestamp: 2026-03-20T23:04:42.120Z
Learning: In the `node-tcnet` repository's `lefthook.yml`, `bunx` (Bun's package runner) is intentionally used instead of `npx` for `actionlint`, `zizmor`, and `lefthook` commands because: (1) the `actionlint` npm package is only a stale wasm wrapper (last release Dec 2022) and is not executable via `npx`; (2) `zizmor` has no npm package and is only available via PyPI, Cargo, or system package managers; (3) `lefthook` is a Go binary whose npm wrapper has low reliability. `bunx` is the correct and practical choice for these tools in this project.

Applied to files:

  • package.json
🔇 Additional comments (6)
package.json (5)

50-50: @typescript/native-preview のキャレット指定は意図的です。

前回レビューで厳密固定が提案されましたが、このパッケージは毎日リリースされるプレビュー版であり、固定すると翌日には陳腐化します。再現性は npm ci + lockfile で担保されています。


37-40: スクリプト変更は適切です。

vitest--project フラグ使用と tsgo --noEmit への移行が、vitest.config.ts の projects 設定および PR 目標(tsc → tsgo 移行)と整合しています。


55-55: Prettier 2 → 3 のメジャーアップグレードです。

Prettier 3 ではデフォルト動作が変更されていますが、prettier 設定ブロック(lines 117-125)で明示的にオプションが指定されているため問題ありません。


70-83: commitlint 設定は正常に移行されています。

scope-empty: [2, "always"] によりスコープ付きコミット(例: fix(parser): ...)はエラーになります。これは意図的な制約と理解しました。


84-125: 設定ファイルの集約は適切に行われています。

markdownlint-cli2textlinttsupprettier の設定が正しく package.json にインライン化されています。tsup の設定は CJS/ESM デュアル出力に対応しており、ビルドパイプラインと整合しています。

vitest.config.ts (1)

6-17: LGTM!

projects 設定が適切に構成されています。前回レビューで指摘された reporters オプションは削除され、CLI フラグ(--reporter verbose)へ移行されたことを確認しました。globalSetup パスも正しく設定されています。

@9c5s 9c5s merged commit 6644be6 into main Mar 28, 2026
2 checks passed
@9c5s 9c5s deleted the chore/config-consolidation branch March 28, 2026 15:30
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.

TS7.0移行: ビルドパイプライン — tsgo 統合

1 participant