chore: Add typeaware rules to oxlint to speed up linting + typecheck#848
Conversation
Deploying baseplate-storybook with
|
| Latest commit: |
f13ad35
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://b151f6fb.baseplate-storybook.pages.dev |
| Branch Preview URL: | https://kingston-eng-1127-add-typeaw.baseplate-storybook.pages.dev |
|
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughMigrates linting from ESLint to OXLint across the repo, updates lint configs and tsconfigs, adjusts package/workspace scripts and devDependencies, converts/typed version-fixing script to TypeScript and removes obsolete version-fix scripts, makes a deterministic sort change in relation build-data, and applies small runtime tweaks (auth callback style and blocker dialog text handling). Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~75 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
📝 Coding Plan
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 |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
There was a problem hiding this comment.
Actionable comments posted: 6
🧹 Nitpick comments (3)
packages/project-builder-common/index.js (1)
4-6: Complete the JSDoc documentation.The JSDoc comment is incomplete. It only documents the parameter type but lacks a function description and return value documentation. Consider adding:
- A description of what the function does
- A
@returnstag documenting the returned Promise and what it resolves to📝 Proposed enhancement for complete JSDoc
/** + * Discovers and returns the default plugins for the project builder. * `@param` {unknown} logger + * `@returns` {Promise<Array>} A promise that resolves to an array of discovered plugins */ export async function getDefaultPlugins(logger) {🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/project-builder-common/index.js` around lines 4 - 6, Add a full JSDoc for the function that accepts the `logger` parameter: include a one-line description of what the function does, document the `@param {unknown} logger` (describe expected shape/usage), and add a `@returns {Promise<...>}` tag describing the Promise and what it resolves to (e.g., resolved value type or void) so the JSDoc fully describes inputs and output for the function that takes `logger`.packages/sync/src/utils/non-overwriteable-map.ts (1)
164-180: Consider refactoring to reduce type suppressions.The migration to oxlint is correct, but this line requires two type safety suppressions (
no-unsafe-returnandno-unsafe-assignment). Consider adding explicit type guards or using a typed merge helper to eliminate these suppressions:♻️ Potential refactor to improve type safety
- (targetValue, sourceValue) => { + (targetValue: unknown, sourceValue: unknown) => { if ( mergeArraysUniquely && Array.isArray(targetValue) && Array.isArray(sourceValue) ) { - // oxlint-disable-next-line `@typescript-eslint/no-unsafe-return`, `@typescript-eslint/no-unsafe-assignment` - return uniq([...targetValue, ...sourceValue]); + return uniq([...targetValue, ...sourceValue]) as typeof sourceValue; } - // oxlint-disable-next-line `@typescript-eslint/no-unsafe-return` - return sourceValue; + return sourceValue as typeof sourceValue; },Note: This is optional and the current approach with suppressions is acceptable given the dynamic nature of the merge operation.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/sync/src/utils/non-overwriteable-map.ts` around lines 164 - 180, The value() method in non-overwriteable-map.ts uses mergeWith over { ...defaults } and overrideValues and currently contains two oxlint type suppressions for unsafe return/assignment; remove those suppressions by adding explicit type guards or a typed merge helper: narrow the checked branch around mergeArraysUniquely to assert the element types (e.g., guard Array.isArray(targetValue) && Array.isArray(sourceValue) and refine their item types before calling uniq and spreading, or create a typedMerge<T> wrapper around mergeWith that enforces the expected value shape so the customizer can safely return typed arrays; update references to mergeWith, mergeArraysUniquely, defaults, overrideValues, uniq, and value() to use the safer types so the linter suppressions can be removed.packages/utils/src/json/stringify-pretty-compact.ts (1)
123-124: Inconsistent lint directive naming convention.Line 123 uses the OXLint convention (
typescript/no-confusing-void-expression), but lines 129 and 175 use the ESLint convention (@typescript-eslint/no-unnecessary-condition). OXLint typically uses thetypescript/prefix for its TypeScript rules.Consider aligning all directives to use the OXLint naming convention for consistency:
♻️ Proposed fix for consistency
- // oxlint-disable-next-line `@typescript-eslint/no-unnecessary-condition` + // oxlint-disable-next-line typescript/no-unnecessary-conditionApply this change to both lines 129 and 175.
Also applies to: 129-130, 175-176
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/utils/src/json/stringify-pretty-compact.ts` around lines 123 - 124, Update the lint-disable directives to use the OXLint naming convention (typescript/...) for consistency: replace occurrences of "@typescript-eslint/no-unnecessary-condition" with "typescript/no-unnecessary-condition" near the code that handles obj.toJSON() (the lines around the obj = (obj as { toJSON: () => void }).toJSON(); statement and the other two occurrences referenced at lines 129 and 175) so all TypeScript rule disables use the same "typescript/" prefix.
🤖 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 59: Update the "version" npm script so Node runs the TypeScript script
with the same runtime flag used elsewhere: change the invocation of node
./scripts/fix-versions.ts in the "version" script to include
--experimental-strip-types (i.e., node --experimental-strip-types
./scripts/fix-versions.ts) so the TypeScript file executes correctly; modify the
package.json "version" script entry accordingly while keeping the existing pnpm
changeset command intact.
In `@packages/project-builder-lib/src/references/expression-types.ts`:
- Around line 229-230: Revert the custom oxlint disable directive back to the
original ESLint form: replace the comment "oxlint-disable-next-line
`@typescript-eslint/no-explicit-any`" with "eslint-disable-next-line
`@typescript-eslint/no-explicit-any`" for the parser property declaration (parser:
RefExpressionParser<any, any, any>), and similarly update the other ~25
instances in packages/project-builder-lib so ESLint still recognizes the
suppression; don't change rule names or remove the suppression, only restore the
"eslint-disable-next-line" prefix.
In `@packages/project-builder-server/src/template-extractor/delete-template.ts`:
- Line 78: Replace the ESLint disable comment that references the wrong rule ID:
change the inline directive that currently says
"@typescript-eslint/no-dynamic-delete" to use the Oxlint rule namespace
"typescript/no-dynamic-delete" (i.e., update the comment in delete-template.ts
where the disable is applied so it reads "// oxlint-disable-next-line
typescript/no-dynamic-delete" to ensure the suppression is honored).
In `@packages/tools/tsconfig.vite.base.json`:
- Around line 6-7: The tsconfig overrides the parent by setting "types":
["node"] and thus loses Vite typings needed for import.meta.env; update the
"types" array in this config to include "vite/client" (e.g., change the "types"
entry to include both "node" and "vite/client") so Vite environment variables
are properly typed and the existing "lib" entries (e.g., "ES2023", "DOM",
"DOM.Iterable") can remain unchanged.
In `@packages/ui-components/src/hooks/use-event-callback.ts`:
- Line 27: Update the OXLint suppression comment in the use-event-callback hook
to use the correct rule namespace: replace the incorrect
"@typescript-eslint/no-unsafe-return" with "typescript/no-unsafe-return" (the
suppression comment near the top of
packages/ui-components/src/hooks/use-event-callback.ts that currently reads the
bad rule); ensure the rest of the comment text (the trailing explanation " --
safe to return the function") remains unchanged so it matches the other
suppression style used in this file (e.g., the existing
"typescript/no-explicit-any" line).
In `@packages/utils/src/types/tuple-paths.ts`:
- Around line 60-61: Replace the incorrect OXLint suppression that uses the
ESLint plugin namespace so the linter recognizes it: locate the generic branch
containing "T extends readonly any[]" in packages/utils/src/types/tuple-paths.ts
and change the comment "// oxlint-disable-next-line
`@typescript-eslint/no-explicit-any`" to "// oxlint-disable-next-line
typescript/no-explicit-any" so the rule id matches the project's oxlint
configuration.
---
Nitpick comments:
In `@packages/project-builder-common/index.js`:
- Around line 4-6: Add a full JSDoc for the function that accepts the `logger`
parameter: include a one-line description of what the function does, document
the `@param {unknown} logger` (describe expected shape/usage), and add a
`@returns {Promise<...>}` tag describing the Promise and what it resolves to
(e.g., resolved value type or void) so the JSDoc fully describes inputs and
output for the function that takes `logger`.
In `@packages/sync/src/utils/non-overwriteable-map.ts`:
- Around line 164-180: The value() method in non-overwriteable-map.ts uses
mergeWith over { ...defaults } and overrideValues and currently contains two
oxlint type suppressions for unsafe return/assignment; remove those suppressions
by adding explicit type guards or a typed merge helper: narrow the checked
branch around mergeArraysUniquely to assert the element types (e.g., guard
Array.isArray(targetValue) && Array.isArray(sourceValue) and refine their item
types before calling uniq and spreading, or create a typedMerge<T> wrapper
around mergeWith that enforces the expected value shape so the customizer can
safely return typed arrays; update references to mergeWith, mergeArraysUniquely,
defaults, overrideValues, uniq, and value() to use the safer types so the linter
suppressions can be removed.
In `@packages/utils/src/json/stringify-pretty-compact.ts`:
- Around line 123-124: Update the lint-disable directives to use the OXLint
naming convention (typescript/...) for consistency: replace occurrences of
"@typescript-eslint/no-unnecessary-condition" with
"typescript/no-unnecessary-condition" near the code that handles obj.toJSON()
(the lines around the obj = (obj as { toJSON: () => void }).toJSON(); statement
and the other two occurrences referenced at lines 129 and 175) so all TypeScript
rule disables use the same "typescript/" prefix.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: e085392c-414a-4d5a-b7e3-a4fac86b5102
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (67)
package.jsonpackages/code-morph/src/morphers/tests/morpher.test-helper.tspackages/core-generators/src/test-helpers/matchers.tspackages/fastify-generators/src/generators/prisma/_shared/build-data-helpers/generate-relation-build-data.tspackages/fastify-generators/src/generators/prisma/_shared/build-data-helpers/generate-relation-build-data.unit.test.tspackages/fastify-generators/src/test-helpers/setup.test-helper.tspackages/fastify-generators/src/types/service-output.tspackages/project-builder-common/index.jspackages/project-builder-lib/src/compiler/admin-crud-action-compiler.tspackages/project-builder-lib/src/compiler/admin-crud-column-compiler-spec.tspackages/project-builder-lib/src/compiler/admin-crud-input-spec.tspackages/project-builder-lib/src/compiler/app-compiler-spec.tspackages/project-builder-lib/src/compiler/model-transformer-compiler-spec.tspackages/project-builder-lib/src/migrations/migration-005-primary-unique-refs.unit.test.tspackages/project-builder-lib/src/migrations/transform-json-path.tspackages/project-builder-lib/src/migrations/types.tspackages/project-builder-lib/src/parser/definition-issue-utils.tspackages/project-builder-lib/src/parser/definition-issue-utils.unit.test.tspackages/project-builder-lib/src/parser/transform-data-with-schema.tspackages/project-builder-lib/src/plugins/imports/loader.unit.test.tspackages/project-builder-lib/src/references/definition-ref-builder.tspackages/project-builder-lib/src/references/definition-ref-registry.tspackages/project-builder-lib/src/references/expression-types.tspackages/project-builder-lib/src/schema/creator/infer-types.tspackages/project-builder-lib/src/specs/packages/library-type-spec.tspackages/project-builder-lib/src/web/specs/admin-crud-action-web-spec.tspackages/project-builder-lib/src/web/specs/admin-crud-column-web-spec.tspackages/project-builder-lib/src/web/specs/admin-crud-input-web-spec.tspackages/project-builder-lib/src/web/specs/model-transformer-web-spec.tspackages/project-builder-server/src/actions/types.tspackages/project-builder-server/src/actions/utils/trpc.tspackages/project-builder-server/src/dev-server/auth-plugin.tspackages/project-builder-server/src/plugins/plugin-discovery.unit.test.tspackages/project-builder-server/src/template-extractor/delete-template.tspackages/project-builder-server/src/templates/utils/extractor-config.tspackages/project-builder-web/src/components/blocker-dialog/blocker-dialog.tsxpackages/project-builder-web/src/components/error-boundary/error-boundary.tsxpackages/project-builder-web/src/router.tsxpackages/project-builder-web/src/routes/admin-sections.$appKey/-components/action-dialog.tsxpackages/project-builder-web/src/routes/admin-sections.$appKey/-components/column-dialog.tsxpackages/project-builder-web/src/routes/admin-sections.$appKey/-components/field-dialog.tsxpackages/react-generators/src/test-helpers/setup.test-helper.tspackages/sync/src/generators/generators.tspackages/sync/src/runner/generator-runner.tspackages/sync/src/runner/generator-runner.unit.test.tspackages/sync/src/templates/extractor/test-utils/mock-context.tspackages/sync/src/utils/non-overwriteable-map.tspackages/tools/eslint-configs/react.jspackages/tools/eslint-configs/rules/no-unused-generator-dependencies.jspackages/tools/eslint-configs/typescript.jspackages/tools/oxlint.config.base.tspackages/tools/tsconfig.node.base.jsonpackages/tools/tsconfig.vite.base.jsonpackages/ui-components/src/components/ui/form-action-bar/form-action-bar.tsxpackages/ui-components/src/hooks/use-event-callback.tspackages/ui-components/src/utils/generic-forward-ref.tspackages/utils/src/events/typed-event-emitter.tspackages/utils/src/fs/handle-not-found-error.unit.test.tspackages/utils/src/json/json-deep-clone.unit.test.tspackages/utils/src/json/stringify-pretty-compact.tspackages/utils/src/objects/safe-merge.tspackages/utils/src/types/tuple-paths.tspackages/utils/src/types/tuple-paths.unit.test.tspnpm-workspace.yamlscripts/fix-versions.tsscripts/version-fix/collect-bad-versions.jsscripts/version-fix/unpublish.js
💤 Files with no reviewable changes (2)
- scripts/version-fix/unpublish.js
- scripts/version-fix/collect-bad-versions.js
| "test-project:save": "pnpm --filter @baseplate-dev/project-builder-test test-project:save", | ||
| "typecheck": "turbo run typecheck --affected --continue", | ||
| "version": "pnpm changeset version && node ./scripts/fix-versions.js", | ||
| "version": "pnpm changeset version && node ./scripts/fix-versions.ts", |
There was a problem hiding this comment.
Missing --experimental-strip-types flag for TypeScript execution.
The version script invokes node ./scripts/fix-versions.ts directly, but TypeScript files require the --experimental-strip-types flag to run with Node.js (as correctly used on line 11 for changesets:check).
🐛 Proposed fix
- "version": "pnpm changeset version && node ./scripts/fix-versions.ts",
+ "version": "pnpm changeset version && node --experimental-strip-types ./scripts/fix-versions.ts",📝 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.
| "version": "pnpm changeset version && node ./scripts/fix-versions.ts", | |
| "version": "pnpm changeset version && node --experimental-strip-types ./scripts/fix-versions.ts", |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@package.json` at line 59, Update the "version" npm script so Node runs the
TypeScript script with the same runtime flag used elsewhere: change the
invocation of node ./scripts/fix-versions.ts in the "version" script to include
--experimental-strip-types (i.e., node --experimental-strip-types
./scripts/fix-versions.ts) so the TypeScript file executes correctly; modify the
package.json "version" script entry accordingly while keeping the existing pnpm
changeset command intact.
| // oxlint-disable-next-line @typescript-eslint/no-explicit-any | ||
| parser: RefExpressionParser<any, any, any>; |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== Remaining ESLint entry points =="
rg -n --glob 'package.json' --glob 'eslint.config.*' --glob '.github/workflows/*' --glob '.vscode/*' '\beslint\b|@eslint/js|packages/tools/eslint-configs'
echo
echo "== Inline disable directive forms in source =="
rg -n --glob '**/*.{js,jsx,ts,tsx,mjs,cjs}' 'oxlint-disable-next-line `@typescript-eslint/no-explicit-any`|eslint-disable-next-line `@typescript-eslint/no-explicit-any`'Repository: halfdomelabs/baseplate
Length of output: 50378
🏁 Script executed:
# First, check the actual file and surrounding context
sed -n '225,235p' packages/project-builder-lib/src/references/expression-types.tsRepository: halfdomelabs/baseplate
Length of output: 433
🏁 Script executed:
# Count how many oxlint-disable directives appear in the changed file
rg -c 'oxlint-disable' packages/project-builder-lib/src/references/expression-types.tsRepository: halfdomelabs/baseplate
Length of output: 67
🏁 Script executed:
# Find all instances of both directive types in this specific file
rg -n 'eslint-disable|oxlint-disable' packages/project-builder-lib/src/references/expression-types.tsRepository: halfdomelabs/baseplate
Length of output: 134
🏁 Script executed:
# Check if other files in the same package show this directive pattern
rg -n 'eslint-disable|oxlint-disable' packages/project-builder-lib/Repository: halfdomelabs/baseplate
Length of output: 5154
🏁 Script executed:
# Check if packages/project-builder-lib has its own package.json with lint config
cat packages/project-builder-lib/package.json | grep -A 5 '"lint"'Repository: halfdomelabs/baseplate
Length of output: 325
🏁 Script executed:
# Check for any eslint config in this package directory
find packages/project-builder-lib -maxdepth 2 -name 'eslint.config.*' -o -name '.eslintrc*'Repository: halfdomelabs/baseplate
Length of output: 111
Do not change disable directive syntax until ESLint is removed from the lint pipeline.
This package runs both oxlint && eslint ., and changing eslint-disable-next-line to oxlint-disable-next-line will break ESLint's suppression. While oxlint honors eslint-disable comments for backward compatibility, ESLint does not recognize oxlint-disable comments. Revert these directives to eslint-disable-next-line across packages/project-builder-lib (25+ instances).
Example fix
- // oxlint-disable-next-line `@typescript-eslint/no-explicit-any`
+ // eslint-disable-next-line `@typescript-eslint/no-explicit-any`📝 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.
| // oxlint-disable-next-line @typescript-eslint/no-explicit-any | |
| parser: RefExpressionParser<any, any, any>; | |
| // eslint-disable-next-line `@typescript-eslint/no-explicit-any` | |
| parser: RefExpressionParser<any, any, any>; |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@packages/project-builder-lib/src/references/expression-types.ts` around lines
229 - 230, Revert the custom oxlint disable directive back to the original
ESLint form: replace the comment "oxlint-disable-next-line
`@typescript-eslint/no-explicit-any`" with "eslint-disable-next-line
`@typescript-eslint/no-explicit-any`" for the parser property declaration (parser:
RefExpressionParser<any, any, any>), and similarly update the other ~25
instances in packages/project-builder-lib so ESLint still recognizes the
suppression; don't change rule names or remove the suppression, only restore the
"eslint-disable-next-line" prefix.
| "lib": ["ES2023", "DOM", "DOM.Iterable"], | ||
| "types": ["node"] |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify whether Vite ambient types are needed but not declared in extending configs.
echo "== tsconfig files extending tsconfig.vite.base.json =="
rg -n '"extends"\s*:\s*"\./tsconfig\.vite\.base\.json"' --type=json -C2
echo
echo "== Any explicit vite/client typings already declared? =="
rg -n '"types"\s*:\s*\[[^]]*vite/client' --type=json -C2
echo
echo "== Potential usage requiring vite/client typing =="
rg -nP --type=ts --type=tsx -C2 '\bimport\.meta\.env\b|\bImportMetaEnv\b'Repository: halfdomelabs/baseplate
Length of output: 990
🏁 Script executed:
#!/bin/bash
# Check the full content of the extending tsconfig files to see if they override types
echo "=== tsconfig.vite.web.json ==="
cat packages/tools/tsconfig.vite.web.json
echo
echo "=== tsconfig.vite.lib.json ==="
cat packages/tools/tsconfig.vite.lib.json
echo
echo "=== tsconfig.vite.base.json ==="
cat packages/tools/tsconfig.vite.base.jsonRepository: halfdomelabs/baseplate
Length of output: 962
🏁 Script executed:
#!/bin/bash
# Find which projects use these tsconfig files
echo "=== Projects using tsconfig.vite.web.json ==="
rg -l 'tsconfig\.vite\.web\.json' --type=json --type=ts
echo
echo "=== Projects using tsconfig.vite.lib.json ==="
rg -l 'tsconfig\.vite\.lib\.json' --type=json --type=ts
echo
echo "=== Check git log for this file to understand intent ==="
git log --oneline -20 packages/tools/tsconfig.vite.base.json 2>/dev/null || echo "(git history not available)"
echo
echo "=== Check if `@tsconfig/vite-react` is in dependencies ==="
rg -l '@tsconfig/vite-react' --type=jsonRepository: halfdomelabs/baseplate
Length of output: 939
🏁 Script executed:
#!/bin/bash
# Check what's in `@tsconfig/vite-react` and if project-builder-web has issues
echo "=== Check if `@tsconfig/vite-react` is installed and what it contains ==="
find . -path "*/node_modules/@tsconfig/vite-react*" -type f -name "tsconfig.json" 2>/dev/null | head -5 | xargs cat 2>/dev/null || echo "(node_modules not available)"
echo
echo "=== project-builder-web tsconfig ==="
cat packages/project-builder-web/tsconfig.app.json 2>/dev/null || echo "not found"
echo
echo "=== Check if project-builder-web would need vite/client types ==="
rg -n 'import\.meta\.env' packages/project-builder-web --type=ts --type=tsx -A2 -B2 || echo "(no usage found)"
echo
echo "=== Check vite version and what it provides ==="
cat packages/tools/package.json | jq '.dependencies.vite, .devDependencies.vite' 2>/dev/null || grep -i '"vite"' packages/tools/package.jsonRepository: halfdomelabs/baseplate
Length of output: 610
Consider adding vite/client to the types array if Vite environment variables will be used.
The base config extends @tsconfig/vite-react but sets "types": ["node"] explicitly. This overrides the parent config's type declarations. If code uses import.meta.env, add "vite/client" to ensure proper typing.
Suggested adjustment
"compilerOptions": {
"lib": ["ES2023", "DOM", "DOM.Iterable"],
- "types": ["node"]
+ "types": ["node", "vite/client"]
}📝 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.
| "lib": ["ES2023", "DOM", "DOM.Iterable"], | |
| "types": ["node"] | |
| "lib": ["ES2023", "DOM", "DOM.Iterable"], | |
| "types": ["node", "vite/client"] |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@packages/tools/tsconfig.vite.base.json` around lines 6 - 7, The tsconfig
overrides the parent by setting "types": ["node"] and thus loses Vite typings
needed for import.meta.env; update the "types" array in this config to include
"vite/client" (e.g., change the "types" entry to include both "node" and
"vite/client") so Vite environment variables are properly typed and the existing
"lib" entries (e.g., "ES2023", "DOM", "DOM.Iterable") can remain unchanged.
Summary by CodeRabbit
Bug Fixes
Chores