Skip to content

chore: clean up deprecated TS 6 configs and eslint generated contract handling - #22

Merged
sommio merged 7 commits into
developfrom
fix/eslint
May 23, 2026
Merged

chore: clean up deprecated TS 6 configs and eslint generated contract handling#22
sommio merged 7 commits into
developfrom
fix/eslint

Conversation

@sommio

@sommio sommio commented May 23, 2026

Copy link
Copy Markdown
Owner

Summary

Remove leftover TS 6 migration artifacts, replace per-file ESLint overrides for the generated API client with a blanket ignore pattern, and drop the hardcoded OpenAPI spec version.

Changes

ESLint — generated contract ignore

The previous config disabled 7 safety rules (no-explicit-any, no-unsafe-*, etc.) individually on packages/api-contract/src/generated/api-client.ts. This was fragile — the generated output can change shape and new files may land in the directory. The entire packages/api-contract/src/generated/** glob is now added to the ESLint ignore list instead, which is the correct posture for generated code.

TSConfig — remove deprecated migration flags

ignoreDeprecations: "6.0" was still present in 4 tsconfig*.json files (apps/web, packages/api-contract, packages/ui). These flags were only needed during the TS 5-to-6 migration window and are no-ops on TS 6+. Removed to keep configs honest.

OpenAPI — drop hardcoded spec version

createOpenApiDocument was setting .setVersion("0.1.0") manually. The version is already managed by the NestJS Swagger setup pipeline; the hardcoded string drifts from reality. Removed.

Docs and skills

  • Added TypeScript 6 guidance skill pack under .agents/skills/typescript-v6/.
  • Recorded a solution doc for the generated-contract lint guardrail decision.

sommio added 6 commits May 7, 2026 16:20
Explain that generated api-contract output must stay outside ESLint gates,
otherwise lint failures from generated files can look like cache problems.
TypeScript 6.0 is already pinned repo-wide, so keep package config
aligned with shared base config and let the workspace typecheck run clean.
Add a complete local skill with references so TS 6 upgrades can use
release-note-based migration guidance and config diagnostics.
Drop obsolete `baseUrl` and `ignoreDeprecations` settings from app and
package tsconfigs, and record skill metadata in `skills-lock`.
@coderabbitai

coderabbitai Bot commented May 23, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@sommio, we couldn't start this review because you've used your available PR reviews for now.

Your plan currently allows 1 review/hour. Refill in 33 minutes and 8 seconds.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more review capacity refills, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than trial, open-source, and free plans. In all cases, review capacity refills continuously over time.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 265f818c-4621-4ddf-9472-7093789b9946

📥 Commits

Reviewing files that changed from the base of the PR and between 6e0dffc and 491a1b4.

📒 Files selected for processing (3)
  • apps/api/src/openapi/openapi-document.ts
  • docs/en/plans/2026-05-23-001-fix-openapi-version-source-plan.md
  • docs/zh-Hans/plans/2026-05-23-001-fix-openapi-version-source-plan.md
📝 Walkthrough

Walkthrough

The PR introduces comprehensive TypeScript 6 skill documentation across nine new files in .agents/skills/typescript-v6/, then applies the documented configuration guidance by removing deprecated compiler options (ignoreDeprecations, baseUrl) from all monorepo TypeScript configs and aligning ESLint scope boundaries to exclude generated code.

Changes

TypeScript 6 Skill Documentation

Layer / File(s) Summary
Skill overview and reference index
.agents/skills/typescript-v6/README.md, .agents/skills/typescript-v6/SKILL.md (metadata), .agents/skills/typescript-v6/references/README.md
README introduces skill scope, capabilities, trigger keywords, known-issue prevention guidance, and links to eight reference documents; references README provides an index, suggested reading order, and official sources.
Core skill guidance: quick start, rules, patterns, and configuration
.agents/skills/typescript-v6/SKILL.md
SKILL.md provides quick-start workflow, critical rules and common mistakes with before/after examples, configuration baselines for bundled web apps and Node packages, common patterns (baseUrl→paths migration, subpath imports, temporary ignoreDeprecations, monorepo setup), verification commands, troubleshooting, and a setup checklist.
Reference documentation: defaults, deprecations, migrations, and patterns
.agents/skills/typescript-v6/references/defaults-migration-reference.md, deprecations-reference.md, migration-v6-reference.md, module-resolution-imports-reference.md, stable-ordering-ts7-reference.md, stdlib-types-reference.md, type-patterns-reference.md, workflow-diagnostics-reference.md
Eight reference documents provide structured guidance on compiler option defaults, deprecation table with replacement options, migration checklist, module resolution and subpath imports, stdlib type additions (es2025, RegExp.escape, Temporal, Map methods), type patterns (satisfies, exhaustive union, assertion functions, branded IDs, Result union), and workflow diagnostics with project-reference configuration.

TypeScript 6 Configuration Migration

Layer / File(s) Summary
Align ESLint scope with generated code exclusion
packages/eslint-config/base.js
ESLint base config adds packages/api-contract/src/generated/** to the ignore list and removes the override that previously disabled TypeScript safety rules for generated files, aligning generated-code exclusion across ESLint config and .gitignore.
Remove deprecated compiler options from TypeScript configurations
apps/web/tsconfig.json, packages/api-contract/tsconfig.json, packages/api-contract/tsconfig.build.json, packages/ui/tsconfig.json, packages/ui/tsconfig.build.json
All tsconfig files remove deprecated ignoreDeprecations and baseUrl compiler options, requiring explicit module resolution configuration via paths instead.
Register skill, document workflow issue, and update metadata
skills-lock.json, docs/en/solutions/workflow-issues/keep-generated-api-contract-output-out-of-eslint-gates-2026-05-08.md, docs/zh-Hans/solutions/workflow-issues/keep-generated-api-contract-output-out-of-eslint-gates-2026-05-08.md, .gitignore, apps/api/src/openapi/openapi-document.ts
Skills-lock.json registers the new typescript-v6 skill; bilingual workflow documentation describes the ESLint/generated-code scope issue and solution; .gitignore adds CLAUDE.md; OpenAPI document builder removes explicit version setting.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • sommio/RSSift#21: Introduced OpenAPI document generation that is modified in this PR to remove the explicit version setting.

Poem

🐰 TypeScript six commands our attention bright,
Configuration defaults now brought to light—
baseUrl and ignoreDeprecations rest,
With paths explicit, our tsconfigs are blessed,
ESLint and skill docs together unite!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title directly summarizes the primary changes: cleaning up deprecated TS 6 configs and improving ESLint handling of generated contracts.
Description check ✅ Passed The description clearly relates to the changeset, explaining the rationale for ESLint ignore updates, TypeScript config cleanup, OpenAPI version removal, and documentation additions.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/eslint

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 6

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.agents/skills/typescript-v6/README.md:
- Around line 131-145: The fenced file-structure block in
.agents/skills/typescript-v6/README.md is missing a language tag (MD040); update
the triple-backtick fence that shows the directory tree (the block starting with
"typescript-v6/") to include a language identifier such as "text" (e.g., change
``` to ```text) so the code block is properly tagged; modify the README.md file
containing that block accordingly.
- Around line 30-31: Add a single blank line after each Markdown heading that is
immediately followed by list content to satisfy markdownlint MD022; specifically
insert a blank line after the "Primary Keywords" heading and the other heading
blocks flagged in the file so each heading is separated from the following list
(ensure the same fix is applied to the other flagged headings in the README).

In @.agents/skills/typescript-v6/references/workflow-diagnostics-reference.md:
- Line 46: The documentation currently refers to a literal "`#/` subpath
imports" which is misleading; update the text around `package.json#imports` and
the `bundler`/`nodenext` notes to clarify that Node/TypeScript `imports` keys
are `#`-prefixed specifiers (e.g. `#alias`, `#alias/*`, `#*`) rather than a
literal "`#/`" prefix, and replace the `#/` wording with an explicit explanation
and examples of `#`-prefixed specifiers and how they map in `imports` to avoid
confusion when debugging bundler/nodenext resolution.

In @.agents/skills/typescript-v6/SKILL.md:
- Around line 302-308: The fenced code block showing the project structure (the
``` block containing the my-ts-project/ tree) needs an explicit language tag to
satisfy MD040; change the opening fence from ``` to ```text so the block becomes
```text and the project-structure block is properly labeled.
- Around line 116-122: The fenced code blocks in SKILL.md (Common Mistakes
section) are missing required blank lines before and/or after them causing MD031
failures; update each affected fenced block (e.g., the JSON block shown and the
blocks at ranges 125-132, 137-146, 149-157, 162-167, 170-178, 183-190, 193-210,
215-217, 220-222) by ensuring there is exactly one blank line above the opening
``` and one blank line below the closing ```, adjusting surrounding text so the
fenced blocks are separated by blank lines.

In `@skills-lock.json`:
- Line 72: Update the skillPath value in skills-lock.json so it matches the
actual registered location: change the string
".claude/skills/typescript-v6/SKILL.md" to the new path
".agents/skills/typescript-v6/SKILL.md" (i.e., update the skillPath entry for
the typescript-v6 skill) so the loader can find the skill.
🪄 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: Repository UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 5677532c-45bf-4043-9785-5a58175d39cc

📥 Commits

Reviewing files that changed from the base of the PR and between bafe49c and 6e0dffc.

📒 Files selected for processing (22)
  • .agents/skills/typescript-v6/README.md
  • .agents/skills/typescript-v6/SKILL.md
  • .agents/skills/typescript-v6/references/README.md
  • .agents/skills/typescript-v6/references/defaults-migration-reference.md
  • .agents/skills/typescript-v6/references/deprecations-reference.md
  • .agents/skills/typescript-v6/references/migration-v6-reference.md
  • .agents/skills/typescript-v6/references/module-resolution-imports-reference.md
  • .agents/skills/typescript-v6/references/stable-ordering-ts7-reference.md
  • .agents/skills/typescript-v6/references/stdlib-types-reference.md
  • .agents/skills/typescript-v6/references/type-patterns-reference.md
  • .agents/skills/typescript-v6/references/workflow-diagnostics-reference.md
  • .gitignore
  • apps/api/src/openapi/openapi-document.ts
  • apps/web/tsconfig.json
  • docs/en/solutions/workflow-issues/keep-generated-api-contract-output-out-of-eslint-gates-2026-05-08.md
  • docs/zh-Hans/solutions/workflow-issues/keep-generated-api-contract-output-out-of-eslint-gates-2026-05-08.md
  • packages/api-contract/tsconfig.build.json
  • packages/api-contract/tsconfig.json
  • packages/eslint-config/base.js
  • packages/ui/tsconfig.build.json
  • packages/ui/tsconfig.json
  • skills-lock.json
💤 Files with no reviewable changes (6)
  • packages/api-contract/tsconfig.build.json
  • packages/ui/tsconfig.build.json
  • packages/api-contract/tsconfig.json
  • apps/api/src/openapi/openapi-document.ts
  • apps/web/tsconfig.json
  • packages/ui/tsconfig.json

Comment on lines +30 to +31
### Primary Keywords
- typescript 6

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Add blank lines after headings to satisfy markdownlint MD022.

These heading blocks are missing a required blank line before the following list content.

Also applies to: 43-44, 53-54, 73-74, 80-81

🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 30-30: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.agents/skills/typescript-v6/README.md around lines 30 - 31, Add a single
blank line after each Markdown heading that is immediately followed by list
content to satisfy markdownlint MD022; specifically insert a blank line after
the "Primary Keywords" heading and the other heading blocks flagged in the file
so each heading is separated from the following list (ensure the same fix is
applied to the other flagged headings in the README).

Comment on lines +131 to +145
```
typescript-v6/
├── SKILL.md # Quick-start patterns, critical rules, and upgrade guidance
├── README.md # This file - discovery and quick reference
└── references/
├── README.md # Reference index
├── migration-v6-reference.md # Dedicated TypeScript 6 migration guide
├── defaults-migration-reference.md # TS 6+ defaults and configuration behavior
├── deprecations-reference.md # Deprecated options and replacements
├── module-resolution-imports-reference.md # bundler/nodenext and `#/` imports
├── stdlib-types-reference.md # New platform/library types in TS 6
├── workflow-diagnostics-reference.md # Compiler commands for migration debugging
├── type-patterns-reference.md # TS-safe patterns for TS 6+ code
└── stable-ordering-ts7-reference.md # `stableTypeOrdering` and TS 7 context
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Specify a language for the fenced code block (MD040).

Add a language tag (for example, text) to this file-structure fence.

🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 131-131: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.agents/skills/typescript-v6/README.md around lines 131 - 145, The fenced
file-structure block in .agents/skills/typescript-v6/README.md is missing a
language tag (MD040); update the triple-backtick fence that shows the directory
tree (the block starting with "typescript-v6/") to include a language identifier
such as "text" (e.g., change ``` to ```text) so the code block is properly
tagged; modify the README.md file containing that block accordingly.

- `paths` aliases
- `types` package discovery
- `package.json` `exports` / `imports`
- `#/` subpath imports under `bundler` or `nodenext`

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Clarify package.json#imports specifier notation (#...), not literal #/.

#/ reads like a literal prefix, but Node/TypeScript imports map keys are #-prefixed (e.g. #alias, #alias/*, #*), which can mislead users debugging bundler/nodenext.

Proposed doc fix
-- `#/` subpath imports under `bundler` or `nodenext`
+- `#alias` package-import specifiers (from `package.json#imports`) under `bundler` or `nodenext`
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- `#/` subpath imports under `bundler` or `nodenext`
- `#alias` package-import specifiers (from `package.json#imports`) under `bundler` or `nodenext`
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.agents/skills/typescript-v6/references/workflow-diagnostics-reference.md at
line 46, The documentation currently refers to a literal "`#/` subpath imports"
which is misleading; update the text around `package.json#imports` and the
`bundler`/`nodenext` notes to clarify that Node/TypeScript `imports` keys are
`#`-prefixed specifiers (e.g. `#alias`, `#alias/*`, `#*`) rather than a literal
"`#/`" prefix, and replace the `#/` wording with an explicit explanation and
examples of `#`-prefixed specifiers and how they map in `imports` to avoid
confusion when debugging bundler/nodenext resolution.

Comment on lines +116 to +122
```json
{
"compilerOptions": {
"outDir": "./dist"
}
}
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Normalize blank lines around fenced code blocks (MD031).

Several fenced blocks in the “Common Mistakes” section need blank lines around them to pass markdownlint consistently.

Also applies to: 125-132, 137-146, 149-157, 162-167, 170-178, 183-190, 193-210, 215-217, 220-222

🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 116-116: Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.agents/skills/typescript-v6/SKILL.md around lines 116 - 122, The fenced
code blocks in SKILL.md (Common Mistakes section) are missing required blank
lines before and/or after them causing MD031 failures; update each affected
fenced block (e.g., the JSON block shown and the blocks at ranges 125-132,
137-146, 149-157, 162-167, 170-178, 183-190, 193-210, 215-217, 220-222) by
ensuring there is exactly one blank line above the opening ``` and one blank
line below the closing ```, adjusting surrounding text so the fenced blocks are
separated by blank lines.

Comment on lines +302 to +308
```
my-ts-project/
├── src/
├── dist/
├── package.json
└── tsconfig.json
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Specify a language for the fenced code block (MD040).

Use an explicit language (for example, text) for the project-structure block.

🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 302-302: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.agents/skills/typescript-v6/SKILL.md around lines 302 - 308, The fenced
code block showing the project structure (the ``` block containing the
my-ts-project/ tree) needs an explicit language tag to satisfy MD040; change the
opening fence from ``` to ```text so the block becomes ```text and the
project-structure block is properly labeled.

Comment thread skills-lock.json
"typescript-v6": {
"source": "nodnarbnitram/claude-code-extensions",
"sourceType": "github",
"skillPath": ".claude/skills/typescript-v6/SKILL.md",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Fix skillPath to the actual registered skill location.

skillPath points to .claude/skills/typescript-v6/SKILL.md, but this PR adds the skill under .agents/skills/typescript-v6/SKILL.md. This mismatch can break loading the new skill from the lock file.

Proposed fix
-      "skillPath": ".claude/skills/typescript-v6/SKILL.md",
+      "skillPath": ".agents/skills/typescript-v6/SKILL.md",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"skillPath": ".claude/skills/typescript-v6/SKILL.md",
"skillPath": ".agents/skills/typescript-v6/SKILL.md",
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@skills-lock.json` at line 72, Update the skillPath value in skills-lock.json
so it matches the actual registered location: change the string
".claude/skills/typescript-v6/SKILL.md" to the new path
".agents/skills/typescript-v6/SKILL.md" (i.e., update the skillPath entry for
the typescript-v6 skill) so the loader can find the skill.

Commit 6e0dffc removed hardcoded .setVersion("0.1.0"), causing Swagger
to default to 1.0.0. E2e contract test failed on deep-equal mismatch.

Read version from root package.json via __dirname relative traversal,
same pattern as openapi-refresh.ts uses for contract path. Single
version source, no extra dependencies.

Also add implementation plan docs (en + zh-Hans).
@sommio
sommio merged commit 1755814 into develop May 23, 2026
6 checks passed
@sommio
sommio deleted the fix/eslint branch May 23, 2026 07:55
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