From fd31a19699e7db234dd99fe122861f4d123a9326 Mon Sep 17 00:00:00 2001 From: asafmahlev Date: Mon, 4 Mar 2024 15:14:45 +0200 Subject: [PATCH] why do i even try --- .eslintignore | 1 + .prettierignore | 2 + .../azure-kusto-data/src/clientDetails.ts | 5 ++- packages/azure-kusto-ingest/tsconfig.json | 37 +++++++++++-------- packages/quick_start_browser/tsconfig.json | 19 ++++++---- 5 files changed, 39 insertions(+), 25 deletions(-) diff --git a/.eslintignore b/.eslintignore index 8108541..1a821d1 100644 --- a/.eslintignore +++ b/.eslintignore @@ -4,3 +4,4 @@ node_modules coverage .nyc_output jest.config.ts +packages/quick_start_browser diff --git a/.prettierignore b/.prettierignore index 7835dac..9391d44 100644 --- a/.prettierignore +++ b/.prettierignore @@ -22,3 +22,5 @@ tsconfig.json .idea .mocharc.json **/test/data/**/* + +/.nx/cache \ No newline at end of file diff --git a/packages/azure-kusto-data/src/clientDetails.ts b/packages/azure-kusto-data/src/clientDetails.ts index 0d2987b..738abe4 100644 --- a/packages/azure-kusto-data/src/clientDetails.ts +++ b/packages/azure-kusto-data/src/clientDetails.ts @@ -33,13 +33,14 @@ export class ClientDetails { static defaultUser(): string { if (isNode) { - let info = userInfo || require("os").userInfo(); + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call,@typescript-eslint/no-var-requires + userInfo = userInfo || require("os").userInfo(); if (!userInfo) { return None; } let username: string | undefined; try { - username = info.username; + username = userInfo.username; } catch (err: any) { /* Ignore possible errors like "uv_os_get_passwd returned ENOMEM" that may occur in some environments. */ diff --git a/packages/azure-kusto-ingest/tsconfig.json b/packages/azure-kusto-ingest/tsconfig.json index ae4d4b1..f8853a2 100644 --- a/packages/azure-kusto-ingest/tsconfig.json +++ b/packages/azure-kusto-ingest/tsconfig.json @@ -1,17 +1,24 @@ { - "extends": "../../tsconfig.json", - "compilerOptions": { - "outDir": "./dist/node/types", - "rootDir": "./src", - "paths": { - "azure-kusto-data": ["../azure-kusto-data/src"] - } - }, - "include": ["src/**/*.ts", "src/**/*.json"], - "exclude": ["src/**/*.browser.ts"], - "references": [ - { - "path": "../azure-kusto-data/tsconfig.json" - } - ] + "extends": "../../tsconfig.json", + "compilerOptions": { + "outDir": "./dist/node/types", + "rootDir": "./src", + "paths": { + "azure-kusto-data": [ + "../azure-kusto-data/src" + ] + } + }, + "include": [ + "src/**/*.ts", + "src/**/*.json" + ], + "exclude": [ + "src/**/*.browser.ts" + ], + "references": [ + { + "path": "../azure-kusto-data/tsconfig.json" + } + ] } diff --git a/packages/quick_start_browser/tsconfig.json b/packages/quick_start_browser/tsconfig.json index 59c8035..9479566 100644 --- a/packages/quick_start_browser/tsconfig.json +++ b/packages/quick_start_browser/tsconfig.json @@ -2,27 +2,30 @@ "compilerOptions": { "target": "ES2020", "useDefineForClassFields": true, - "lib": ["ES2020", "DOM", "DOM.Iterable"], + "lib": [ + "ES2020", + "DOM", + "DOM.Iterable" + ], "module": "ESNext", "skipLibCheck": true, - - /* Bundler mode */ "moduleResolution": "bundler", "allowImportingTsExtensions": true, "resolveJsonModule": true, "isolatedModules": true, "noEmit": true, "jsx": "react-jsx", - - /* Linting */ "strict": true, "noUnusedLocals": true, "noUnusedParameters": true, "noFallthroughCasesInSwitch": true }, - "include": ["src"], + "include": [ + "src" + ], "references": [ - - { "path": "./tsconfig.node.json" } + { + "path": "./tsconfig.node.json" + } ] }