Conversation
|
📝 WalkthroughWalkthroughRemoved explicit TypeScript ESLint Changes
Sequence Diagram(s)sequenceDiagram
actor Developer
participant ViteConfig as "Vite config (index.ts)"
participant FS as "node:fs (existsSync)"
participant tsconfigPaths as "tsconfigPaths plugin"
participant Vite as "Vite build"
Developer->>ViteConfig: start build
ViteConfig->>FS: existsSync(tsconfig.lib.json)?
alt tsconfig exists
ViteConfig->>tsconfigPaths: init with projects: [tsconfig.lib.json]
else tsconfig missing
ViteConfig->>tsconfigPaths: init with projects: undefined
end
tsconfigPaths->>Vite: register plugin
Vite->>Vite: run build with registered plugins
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
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. Comment |
|
Triggered from #294 by @black7375. Checking if we can fast forward Target branch ( commit fb4634c42ccfbdc3b82b24731c0e5d20c406c9c1 (HEAD -> main, origin/main)
Author: alstjr7375 <alstjr7375@daum.net>
Date: Mon Dec 1 00:00:00 2025 +0900
chore: bumpup dependencyPull request ( commit 028aeece4644451fdb8bc565f99f25d36a82f1ba (pull_request/dependency-update)
Author: alstjr7375 <alstjr7375@daum.net>
Date: Tue Dec 2 00:00:00 2025 +0900
chore: update depsIt is possible to fast forward |
There was a problem hiding this comment.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
package.json (1)
55-72: Fix g:codegen script: vite-node 5.2.0 does not support--tsconfigflag.The
g:codegenscript usesvite-node --tsconfig ./tsconfig.codegen.json, but vite-node 5.2.0 removed the--tsconfigflag. This will break the codegen pipeline. Use--options.syntax or configure TypeScript through vite.config.ts instead.
🧹 Nitpick comments (1)
configs/vite-config-custom/src/index.ts (1)
165-170: Avoid passing{ projects: undefined }tovite-tsconfig-paths.If v6 treats
projects: undefinedas “no projects,” path resolution could silently stop. Consider only passing the option when the file exists.♻️ Proposed safer conditional wiring
- const tsconfigPath = resolve(cwd(), "tsconfig.lib.json"); - const plugins = new PluginBuilder([ - tsconfigPaths({ - projects: existsSync(tsconfigPath) ? [tsconfigPath] : undefined - }) - ]); + const tsconfigPath = resolve(cwd(), "tsconfig.lib.json"); + const plugins = new PluginBuilder([ + existsSync(tsconfigPath) + ? tsconfigPaths({ projects: [tsconfigPath] }) + : tsconfigPaths() + ]);
028aeec to
d245af3
Compare
|
Triggered from #294 by @black7375. Checking if we can fast forward Target branch ( commit fb4634c42ccfbdc3b82b24731c0e5d20c406c9c1 (HEAD -> main, origin/main)
Author: alstjr7375 <alstjr7375@daum.net>
Date: Mon Dec 1 00:00:00 2025 +0900
chore: bumpup dependencyPull request ( commit d245af329da086591d564171e10f939e053a84f7 (pull_request/dependency-update)
Author: alstjr7375 <alstjr7375@daum.net>
Date: Tue Dec 2 00:00:00 2025 +0900
chore: update depsIt is possible to fast forward |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In `@configs/vite-config-custom/src/index.ts`:
- Around line 165-170: The projects option is being passed an absolute path
(tsconfigPath built with resolve(cwd(), "tsconfig.lib.json")), which breaks
vite-tsconfig-paths v6; update the tsconfigPaths invocation in PluginBuilder so
it either supplies a relative project path (e.g., "tsconfig.lib.json" when
existsSync(tsconfigPath) is true) or remove the projects property entirely and
let the plugin auto-discover via the root option; adjust the tsconfigPaths(...)
call around the tsconfigPath / existsSync check to implement one of these two
fixes.
In `@examples/react-babel/eslint.config.js`:
- Around line 18-23: You removed the explicit project: ["tsconfig.json"] and now
rely on languageOptions.parserOptions.tsconfigRootDir and projectService to
auto-discover the tsconfig, which can pick up the workspace root tsconfig
instead of examples/react-babel/tsconfig.json; either restore an explicit
project entry (e.g., set languageOptions.parserOptions.project to
["tsconfig.json"] or to the absolute path resolved from PACKAGE_ROOT) to pin the
intended config, or keep projectService and add a verification step (run ESLint
in that package or print resolved parser config) to confirm the parser resolves
PACKAGE_ROOT/tsconfig.json; update the languageOptions.parserOptions block
(symbols: languageOptions, parserOptions, tsconfigRootDir, projectService,
project) accordingly.
🧹 Nitpick comments (1)
examples/react-swc/package.json (1)
22-23: Consider removing redundant TypeScript ESLint packages.The
typescript-eslintpackage (line 33) is the modern unified package that re-exports both@typescript-eslint/eslint-pluginand@typescript-eslint/parser. Having both may be redundant. Thereact-babelexample only usestypescript-eslintwithout the separate packages.This is pre-existing and doesn't block this PR, but worth cleaning up for consistency.
Also applies to: 33-33
| const tsconfigPath = resolve(cwd(), "tsconfig.lib.json"); | ||
| const plugins = new PluginBuilder([ | ||
| tsconfigPaths({ | ||
| projects: existsSync(tsconfigPath) ? [tsconfigPath] : undefined | ||
| }) | ||
| ]); |
There was a problem hiding this comment.
🧩 Analysis chain
🌐 Web query:
vite-tsconfig-paths version 6.0.4 projects option API documentation
💡 Result:
In vite-tsconfig-paths v6.0.4, the plugin options include:
projects: string[]: Use this only for “esoteric” setups to explicitly point the plugin at your tsconfig files. Each entry is relative to therootoption. Ifprojectsis set, the plugin will not search therootdirectory for tsconfig files (the docs recommend tryingrootalone first becauseprojectsis more brittle). [1]- Related behavior: the default for
rootdepends on whetherprojectsis defined—if it is,rootdefaults to the Vite project root; otherwise it defaults to Vite’ssearchForWorkspaceRoot. [1]
Example:
import tsconfigPaths from 'vite-tsconfig-paths'
export default {
plugins: [
tsconfigPaths({
root: '.',
projects: ['apps/web/tsconfig.json', 'packages/shared'],
}),
],
}Sources:
[1] vite-tsconfig-paths v6.0.4 README (UNPKG) (app.unpkg.com)
Citations:
🏁 Script executed:
# Find and examine the file in question
fd -t f "index.ts" configs/vite-config-custom/src/ | head -5Repository: mincho-js/mincho
Length of output: 99
🏁 Script executed:
cat -n configs/vite-config-custom/src/index.ts | sed -n '155,180p'Repository: mincho-js/mincho
Length of output: 703
🏁 Script executed:
# Also check what PluginBuilder is and how it's used
cat -n configs/vite-config-custom/src/index.ts | sed -n '1,50p'Repository: mincho-js/mincho
Length of output: 2059
Use a relative path for the projects option or reconsider using it.
The projects option in vite-tsconfig-paths v6.0.4 expects paths relative to the root option, but the code passes an absolute path via resolve(cwd(), "tsconfig.lib.json"). This will not work. Either:
- Pass a relative path:
projects: existsSync(tsconfigPath) ? ["tsconfig.lib.json"] : undefined - Or omit
projectsentirely and rely on the plugin's auto-discovery via therootoption (the documentation recommends this approach asprojectsis "more brittle").
🤖 Prompt for AI Agents
In `@configs/vite-config-custom/src/index.ts` around lines 165 - 170, The projects
option is being passed an absolute path (tsconfigPath built with resolve(cwd(),
"tsconfig.lib.json")), which breaks vite-tsconfig-paths v6; update the
tsconfigPaths invocation in PluginBuilder so it either supplies a relative
project path (e.g., "tsconfig.lib.json" when existsSync(tsconfigPath) is true)
or remove the projects property entirely and let the plugin auto-discover via
the root option; adjust the tsconfigPaths(...) call around the tsconfigPath /
existsSync check to implement one of these two fixes.
| languageOptions: { | ||
| parserOptions: { | ||
| tsconfigRootDir: PACKAGE_ROOT, | ||
| projectService: true, | ||
| }, | ||
| }, | ||
| } | ||
| } |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
# First, look at the full eslint.config.js file to understand context
cat -n examples/react-babel/eslint.config.jsRepository: mincho-js/mincho
Length of output: 1897
🏁 Script executed:
# Check what PACKAGE_ROOT is set to
grep -n "PACKAGE_ROOT" examples/react-babel/eslint.config.jsRepository: mincho-js/mincho
Length of output: 141
🏁 Script executed:
# Check if there's a tsconfig.json in examples/react-babel
find examples/react-babel -name "tsconfig*.json" -type fRepository: mincho-js/mincho
Length of output: 173
🏁 Script executed:
# Check the directory structure
tree -L 3 examples/react-babel/ 2>/dev/null || find examples/react-babel -type f -name "*.json" | head -20Repository: mincho-js/mincho
Length of output: 335
🏁 Script executed:
# Check if there's a tsconfig at the root or in examples
find . -maxdepth 3 -name "tsconfig*.json" -type f | grep -E "(^./tsconfig|./examples/)"Repository: mincho-js/mincho
Length of output: 330
🏁 Script executed:
# Check git history to see if `project` was explicitly removed
git log -p --all -- examples/react-babel/eslint.config.js | grep -A 20 -B 5 "project" | head -60Repository: mincho-js/mincho
Length of output: 42
🏁 Script executed:
# Check if there are any tests that validate the eslint config behavior
find . -type f -name "*.test.*" -o -name "*.spec.*" | xargs grep -l "eslint" 2>/dev/null | head -5Repository: mincho-js/mincho
Length of output: 42
🏁 Script executed:
# Check one of the tsconfig files in react-babel to understand the setup
cat examples/react-babel/tsconfig.jsonRepository: mincho-js/mincho
Length of output: 403
🏁 Script executed:
# Check typescript-eslint documentation or examples about projectService with tsconfigRootDir
# Also check if global parserOptions without parser is a valid pattern in flat config
rg -A 5 "projectService.*true" . --type js --type json | head -40Repository: mincho-js/mincho
Length of output: 2032
🏁 Script executed:
# Look at the actual change/commit to understand intent
git log --oneline examples/react-babel/eslint.config.js | head -5Repository: mincho-js/mincho
Length of output: 86
🏁 Script executed:
# Check if this config file has been recently added or heavily modified
git log --all --stat examples/react-babel/eslint.config.js | head -20Repository: mincho-js/mincho
Length of output: 720
🏁 Script executed:
# Get the full diff of the recent change to see what was actually modified
git show d245af3 examples/react-babel/eslint.config.js | head -100Repository: mincho-js/mincho
Length of output: 1917
🏁 Script executed:
# Look at previous versions to understand what changed
git show 26546b1:examples/react-babel/eslint.config.js 2>/dev/null | head -60Repository: mincho-js/mincho
Length of output: 1539
Verify projectService correctly resolves tsconfig.json after removing explicit project array.
The change removed project: ["tsconfig.json"] and now relies on projectService auto-discovery. With tsconfigRootDir: cwd() and projectService: true, the parser should find examples/react-babel/tsconfig.json via upward search; however, confirm this is picking the intended config and not the root-level tsconfig.json.
🤖 Prompt for AI Agents
In `@examples/react-babel/eslint.config.js` around lines 18 - 23, You removed the
explicit project: ["tsconfig.json"] and now rely on
languageOptions.parserOptions.tsconfigRootDir and projectService to
auto-discover the tsconfig, which can pick up the workspace root tsconfig
instead of examples/react-babel/tsconfig.json; either restore an explicit
project entry (e.g., set languageOptions.parserOptions.project to
["tsconfig.json"] or to the absolute path resolved from PACKAGE_ROOT) to pin the
intended config, or keep projectService and add a verification step (run ESLint
in that package or print resolved parser config) to confirm the parser resolves
PACKAGE_ROOT/tsconfig.json; update the languageOptions.parserOptions block
(symbols: languageOptions, parserOptions, tsconfigRootDir, projectService,
project) accordingly.
|
/fast-forward |
|
Triggered from #294 (comment) by @black7375. Trying to fast forward Target branch ( commit fb4634c42ccfbdc3b82b24731c0e5d20c406c9c1 (HEAD -> main, origin/main)
Author: alstjr7375 <alstjr7375@daum.net>
Date: Mon Dec 1 00:00:00 2025 +0900
chore: bumpup dependencyPull request ( commit d245af329da086591d564171e10f939e053a84f7 (pull_request/dependency-update)
Author: alstjr7375 <alstjr7375@daum.net>
Date: Tue Dec 2 00:00:00 2025 +0900
chore: update depsFast forwarding $ git push origin d245af329da086591d564171e10f939e053a84f7:main
To https://github.com/mincho-js/mincho.git
fb4634c..d245af3 d245af329da086591d564171e10f939e053a84f7 -> main |
Description
Related Issue
Summary by CodeRabbit
Chores
Improvements
✏️ Tip: You can customize this high-level summary in your review settings.
Additional context
Checklist