tsconfigs

por redis

Localiza y modifica la configuración de TypeScript en RedisInsight. Úsalo al agregar alias de ruta, introducir una nueva área de TS, depurar rutas de webpack/ts-node/ESLint…

npx skills add https://github.com/redis/redisinsight --skill tsconfigs

TypeScript Configuration

RedisInsight has no root tsconfig.json. Config is split per area, each owning its own paths, includes, and consumers. ESLint uses parserOptions.project: true to auto-discover the nearest tsconfig for each linted file.

Layout

FileOwnsConsumers
redisinsight/ui/tsconfig.jsonUI source, uiSrc/*, apiClient pathsVite (UI build), ESLint UI override, npm run type-check:ui
redisinsight/api/tsconfig.jsonAPI source, src/*, tests/* pathsNestJS build, ESLint API override
redisinsight/api/tsconfig.check.jsonSame as base + strict: true (with strictPropertyInitialization and useUnknownInCatchVariables off) and noEmit: truenpm run type-check:api only — kept separate so strict mode doesn't break nest build. See the type-check-baselines skill.
redisinsight/desktop/tsconfig.jsonDesktop source. Paths desktopSrc/*, apiSrc/*, uiSrc/*, apiClient, apiClient/* for TypeScript / IDE intellisenseESLint for desktop files, TS language server
configs/tsconfig.jsonCompiler options (module: CommonJS, esModuleInterop) used by ts-node to load the .ts webpack configsts-node via TS_NODE_PROJECT set in build:main / build:main:stage / build:stage
.storybook/tsconfig.jsonStorybook framework files, extends UI tsconfigStorybook + ESLint
stories/tsconfig.jsonStory files. Extends UI tsconfig; rewires uiSrc/* to resolve from redisinsight/uiStorybook + ESLint
tests/e2e-playwright/tsconfig.jsonPlaywright E2E suiteE2E runner (sub-project with own package.json, eslint-ignored at root)

Webpack path resolution (configs/webpack.config.base.ts)

Webpack uses explicit resolve.alias entries (not tsconfig-paths-webpack-plugin):

alias: {
  desktopSrc: webpackPaths.desktopSrcPath,
  apiSrc: resolve(webpackPaths.apiPath, 'src'),
  uiSrc: webpackPaths.uiSrcPath,
  apiClient: resolve(webpackPaths.riPath, 'api-client'),
  // ...
}

If you add a new path alias used by desktop code, add it in both places: redisinsight/desktop/tsconfig.json (for TypeScript / ESLint / IDE) and configs/webpack.config.base.ts resolve.alias (for the electron bundle).

ts-node and webpack TS configs

The webpack configs in configs/ are .ts files with type annotations. When webpack --config ./configs/*.ts runs, ts-node compiles them. Three package.json scripts set TS_NODE_PROJECT=./configs/tsconfig.json so ts-node uses the right compiler options:

  • build:main
  • build:main:stage
  • build:stage

configs/tsconfig.json deliberately does not set allowJs. Any .js file inside scripts/ or configs/ must be CommonJS (require / module.exports) — Node 22's module syntax detection will treat ESM-syntax .js files as ESM and break references to __dirname. Two scripts converted for this reason: scripts/prebuild.js, scripts/DeleteSourceMaps.js.

ESLint

.eslintrc.js:

  • Root parserOptions.project: true — auto-discovers the nearest tsconfig per file.
  • API override: parserOptions.project: redisinsight/api/tsconfig.json (explicit).
  • UI override: parserOptions.project: redisinsight/ui/tsconfig.json (explicit).
  • Files in .storybook/, .github/, etc. are not linted by eslint . because ESLint skips dot-prefixed paths during directory expansion.

If you add a top-level TS folder that ESLint will reach, drop a tsconfig in it or parserOptions.project: true will fail to find one.

Common tasks

Adding a path alias used by desktop / electron

  1. Add the alias to redisinsight/desktop/tsconfig.json compilerOptions.paths.
  2. If the alias is also used by UI code, add it to redisinsight/ui/tsconfig.json.
  3. If the alias is also used by API code, add it to redisinsight/api/tsconfig.json.
  4. For aliases used by the electron bundle (anything imported from redisinsight/desktop/**), also mirror the alias into configs/webpack.config.base.ts resolve.alias. Vite resolves UI aliases from redisinsight/ui/tsconfig.json automatically.

Adding a new top-level TS folder

Create a tsconfig.json in it. Bare minimum:

{
  "extends": "../redisinsight/ui/tsconfig.json",
  "include": ["**/*"]
}

Without it, ESLint's parserOptions.project: true will error on those files.

Adding a new .ts webpack config under configs/

No action needed — configs/tsconfig.json includes **/*.

Adding a Node script that needs to run without ts-node

Place under scripts/ as CommonJS (require/module.exports). Do not use ESM syntax — configs/tsconfig.json no longer has allowJs and Node 22 will load ESM-syntax .js files as ESM (no __dirname).

Más skills de redis

docs-sync
redis
Analizar la implementación y configuración de la rama master para encontrar documentación faltante, incorrecta o desactualizada en docs/, README.md y READMEs por paquete. Usar…
redis-query-engine
redis
Orientación sobre Redis Query Engine (RQE) que cubre diseño de esquemas FT.CREATE, selección de tipos de campo (TEXT, TAG, NUMERIC, GEO, GEOSHAPE, VECTOR), sintaxis de consultas DIALECT 2,…
redis-search
redis
Orientación sobre Redis Search que cubre diseño de esquemas FT.CREATE, selección de tipos de campo (TEXT, TAG, NUMERIC, GEO, GEOSHAPE, VECTOR, JSON path), sintaxis de consulta DIALECT 2,…
redis-security
redis
Guía de seguridad de Redis que cubre autenticación (requirepass y usuarios ACL), TLS, control de acceso basado en ACL con mínimo privilegio, restricción de exposición de red mediante…
redis-semantic-cache
redis
Guía de Redis LangCache para el almacenamiento en caché semántico de respuestas de LLM en Redis Cloud: llamadas a search/set mediante el SDK o la API REST, ajuste del umbral de similitud,…
redis-vector-search
redis
Guía de búsqueda vectorial en Redis que cubre la elección del algoritmo HNSW vs FLAT, configuración del índice vectorial (dimensiones, métrica de distancia, tipo de datos), búsqueda híbrida filtrada…
bump-test-image
redis
Actualiza la imagen de prueba docker de Redis predeterminada (redislabs/client-libs-test) en el DEFAULT_DOCKER_CONFIG compartido y la matriz de CI, luego haz force-push de los…
i18n
redis
Convenciones de internacionalización para la interfaz de RedisInsight (i18next). Úsese al añadir o modificar cadenas visibles para el usuario en redisinsight/ui/**, al editar el…