-
-
Notifications
You must be signed in to change notification settings - Fork 1
chore: update deps #294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: update deps #294
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,33 +1,32 @@ | ||
| import { resolve } from "node:path"; | ||
| import { cwd } from "node:process"; | ||
| import globals from 'globals' | ||
| import globals from "globals"; | ||
| import { defineConfig } from "eslint/config"; | ||
| import eslint from '@eslint/js' | ||
| import tseslint from 'typescript-eslint' | ||
| import eslint from "@eslint/js"; | ||
| import tseslint from "typescript-eslint"; | ||
| import tsParser from "@typescript-eslint/parser"; | ||
| import reactRefreshPlugin from 'eslint-plugin-react-refresh' | ||
| import reactHooksPlugin from 'eslint-plugin-react-hooks' | ||
| import reactRefreshPlugin from "eslint-plugin-react-refresh"; | ||
| import reactHooksPlugin from "eslint-plugin-react-hooks"; | ||
|
|
||
| const PACKAGE_ROOT = resolve(cwd()); | ||
|
|
||
| export default defineConfig( | ||
| eslint.configs.recommended, | ||
| ...tseslint.configs.recommended, | ||
| eslint.configs.recommended, | ||
| ...tseslint.configs.recommended, | ||
| reactHooksPlugin.configs.flat.recommended, | ||
| { | ||
| languageOptions: { | ||
| parserOptions: { | ||
| tsconfigRootDir: PACKAGE_ROOT, | ||
| projectService: true, | ||
| }, | ||
| }, | ||
| } | ||
| } | ||
|
Comment on lines
18
to
+23
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 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 The change removed 🤖 Prompt for AI Agents |
||
| }, | ||
| { | ||
| files: ['**/*.{ts,tsx}'], | ||
| files: ["**/*.{ts,tsx}"], | ||
| languageOptions: { | ||
| parser: tsParser, | ||
| parserOptions: { | ||
| project: ["tsconfig.json"], | ||
| tsconfigRootDir: cwd(), | ||
| projectService: true, | ||
|
|
||
|
|
@@ -37,22 +36,22 @@ export default defineConfig( | |
| } | ||
| }, | ||
| plugins: { | ||
| 'react-hooks': reactHooksPlugin, | ||
| 'react-refresh': reactRefreshPlugin, | ||
| "react-hooks": reactHooksPlugin, | ||
| "react-refresh": reactRefreshPlugin | ||
| }, | ||
| rules: { | ||
| ...reactHooksPlugin.configs.recommended.rules, | ||
| 'react-refresh/only-export-components': [ | ||
| 'warn', | ||
| { allowConstantExport: true }, | ||
| ], | ||
| }, | ||
| "react-refresh/only-export-components": [ | ||
| "warn", | ||
| { allowConstantExport: true } | ||
| ] | ||
| } | ||
| }, | ||
| { | ||
| files: ["*.js", "*.cjs", "*.mjs"], | ||
| extends: [tseslint.configs.disableTypeChecked], | ||
| extends: [tseslint.configs.disableTypeChecked] | ||
| }, | ||
| { | ||
| ignores: ["dist/**"], | ||
| }, | ||
| ) | ||
| ignores: ["dist/**"] | ||
| } | ||
| ); | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 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]rootdepends on whetherprojectsis defined—if it is,rootdefaults to the Vite project root; otherwise it defaults to Vite’ssearchForWorkspaceRoot. [1]Example:
Sources:
[1] vite-tsconfig-paths v6.0.4 README (UNPKG) (app.unpkg.com)
Citations:
🏁 Script executed:
Repository: mincho-js/mincho
Length of output: 99
🏁 Script executed:
Repository: mincho-js/mincho
Length of output: 703
🏁 Script executed:
Repository: mincho-js/mincho
Length of output: 2059
Use a relative path for the
projectsoption or reconsider using it.The
projectsoption in vite-tsconfig-paths v6.0.4 expects paths relative to therootoption, but the code passes an absolute path viaresolve(cwd(), "tsconfig.lib.json"). This will not work. Either:projects: existsSync(tsconfigPath) ? ["tsconfig.lib.json"] : undefinedprojectsentirely and rely on the plugin's auto-discovery via therootoption (the documentation recommends this approach asprojectsis "more brittle").🤖 Prompt for AI Agents