From 02238516206ea13f981bb69251ebc93a8fef4839 Mon Sep 17 00:00:00 2001 From: Aman Raj <92664006+araj00@users.noreply.github.com> Date: Wed, 19 Nov 2025 21:43:07 +0530 Subject: [PATCH] Fixed eslint warnings on changed files (#15928) --- packages/twenty-server/scripts/setup-db.ts | 3 +-- packages/twenty-server/scripts/truncate-db.ts | 9 ++++----- packages/twenty-server/scripts/utils.ts | 4 ++-- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/packages/twenty-server/scripts/setup-db.ts b/packages/twenty-server/scripts/setup-db.ts index 0da6654802..d62642982c 100644 --- a/packages/twenty-server/scripts/setup-db.ts +++ b/packages/twenty-server/scripts/setup-db.ts @@ -1,5 +1,3 @@ -import console from 'console'; - import { rawDataSource } from 'src/database/typeorm/raw/raw.datasource'; import { camelToSnakeCase, performQuery } from './utils'; @@ -84,6 +82,7 @@ $$;`, } }) .catch((err) => { + // eslint-disable-next-line no-console console.error('Error during Data Source initialization:', err); }); diff --git a/packages/twenty-server/scripts/truncate-db.ts b/packages/twenty-server/scripts/truncate-db.ts index 1165522785..8b865a8a45 100644 --- a/packages/twenty-server/scripts/truncate-db.ts +++ b/packages/twenty-server/scripts/truncate-db.ts @@ -1,5 +1,3 @@ -import console from 'console'; - import { rawDataSource } from 'src/database/typeorm/raw/raw.datasource'; import { performQuery } from './utils'; @@ -13,8 +11,8 @@ async function dropSchemasSequentially() { (await performQuery<{ schema_name: string }[]>( ` SELECT n.nspname AS "schema_name" - FROM pg_catalog.pg_namespace n - WHERE n.nspname !~ '^pg_' + FROM pg_catalog.pg_namespace n + WHERE n.nspname !~ '^pg_' AND n.nspname <> 'information_schema' AND n.nspname NOT IN ('metric_helpers', 'user_management', 'public') `, @@ -35,9 +33,10 @@ async function dropSchemasSequentially() { ), ); } - + // eslint-disable-next-line no-console console.log('All schemas dropped successfully.'); } catch (err) { + // eslint-disable-next-line no-console console.error('Error during schema dropping:', err); } } diff --git a/packages/twenty-server/scripts/utils.ts b/packages/twenty-server/scripts/utils.ts index 2f0602f17b..6dab908532 100644 --- a/packages/twenty-server/scripts/utils.ts +++ b/packages/twenty-server/scripts/utils.ts @@ -1,5 +1,3 @@ -import console from 'console'; - import { rawDataSource } from 'src/database/typeorm/raw/raw.datasource'; export const camelToSnakeCase = (str: string) => @@ -15,6 +13,7 @@ export const performQuery = async ( const result = await rawDataSource.query(query); if (withLog) { + // eslint-disable-next-line no-console console.log(`Performed '${consoleDescription}' successfully`); } @@ -28,6 +27,7 @@ export const performQuery = async ( message = `Failed to perform '${consoleDescription}': ${err}`; } if (withLog) { + // eslint-disable-next-line no-console console.error(message); } }