From ee9b8ef700864d5202c8d7b53f60e498c5cba657 Mon Sep 17 00:00:00 2001 From: Zack Date: Fri, 18 Oct 2024 20:05:48 +0800 Subject: [PATCH] feat: update env --- apps/api/src/core/logger/pino-logger.ts | 3 --- apps/web/.eslintrc.cjs | 4 ---- apps/web/env.d.ts | 8 ++++++++ apps/web/postcss.config.cjs | 8 ++++---- apps/web/vite.config.ts | 3 +++ renovate.json | 4 ++++ 6 files changed, 19 insertions(+), 11 deletions(-) delete mode 100644 apps/web/.eslintrc.cjs create mode 100644 apps/web/env.d.ts diff --git a/apps/api/src/core/logger/pino-logger.ts b/apps/api/src/core/logger/pino-logger.ts index 4b70b4b..6943d45 100644 --- a/apps/api/src/core/logger/pino-logger.ts +++ b/apps/api/src/core/logger/pino-logger.ts @@ -30,7 +30,6 @@ let outOfContext: pino.Logger | undefined; export function __resetOutOfContextForTests() { outOfContext = undefined; - // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore reset root for tests only PinoLogger.root = undefined; } @@ -80,7 +79,6 @@ export class PinoLogger implements PinoMethods { get logger(): pino.Logger { // outOfContext is always set in runtime before starts using - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion return storage.getStore()?.logger || outOfContext!; } @@ -157,7 +155,6 @@ export class PinoLogger implements PinoMethods { args = [{ [this.contextName]: this.context }, ...args]; } } - // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore args are union of tuple types this.logger[method](...args); } diff --git a/apps/web/.eslintrc.cjs b/apps/web/.eslintrc.cjs deleted file mode 100644 index 3b1e8a6..0000000 --- a/apps/web/.eslintrc.cjs +++ /dev/null @@ -1,4 +0,0 @@ -/** @type {import('eslint').Linter.Config} */ -module.exports = { - extends: ["@remix-run/eslint-config", "@remix-run/eslint-config/node"], -}; diff --git a/apps/web/env.d.ts b/apps/web/env.d.ts new file mode 100644 index 0000000..c698eb7 --- /dev/null +++ b/apps/web/env.d.ts @@ -0,0 +1,8 @@ +namespace NodeJS { + interface ProcessEnv { + DATABASE_URL: string; + SITE_TITLE?: string; + SITE_DESCRIPTION?: string; + PORT?: string | number; + } +} diff --git a/apps/web/postcss.config.cjs b/apps/web/postcss.config.cjs index 4f4cbd2..e305dd9 100644 --- a/apps/web/postcss.config.cjs +++ b/apps/web/postcss.config.cjs @@ -1,8 +1,8 @@ const config = { - plugins: { - tailwindcss: {}, - autoprefixer: {}, - }, + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, }; module.exports = config; diff --git a/apps/web/vite.config.ts b/apps/web/vite.config.ts index bca549e..59a6ccc 100644 --- a/apps/web/vite.config.ts +++ b/apps/web/vite.config.ts @@ -41,4 +41,7 @@ export default defineConfig({ }), tsconfigPaths(), ], + define: { + 'process.env': process.env, + }, }); diff --git a/renovate.json b/renovate.json index 6525d2f..905ddce 100644 --- a/renovate.json +++ b/renovate.json @@ -44,6 +44,10 @@ "commitMessagePrefix": "chore(renovate):", "groupName": "pin" }, + { + "matchDepTypes": ["engines"], + "enabled": false + }, { "matchPackageNames": ["node", "pnpm", "fastify", "@fastify/*", "helmet"], "enabled": false