UNPKG

@storm-software/eslint

Version:

A package containing the base ESLint configuration used by Storm Software across many projects.

30 lines (27 loc) 803 B
import { joinPaths } from "./chunk-5CQE3UOC.js"; import { init_esm_shims } from "./chunk-KBMKJUYQ.js"; // src/utils/tsconfig-path.ts init_esm_shims(); import { existsSync } from "node:fs"; function getTsConfigPath(basePath = "./") { let tsconfigPath = "tsconfig.json"; if (existsSync(joinPaths(basePath, "tsconfig.base.json"))) { tsconfigPath = "tsconfig.base.json"; } else if (existsSync(joinPaths(basePath, "tsconfig.app.json"))) { tsconfigPath = "tsconfig.app.json"; } else if (existsSync(joinPaths(basePath, "tsconfig.lib.json"))) { tsconfigPath = "tsconfig.lib.json"; } else { console.warn( "No tsconfig.json found. Consider adding a tsconfig.json file to your project's ESLint configuration." ); } return tsconfigPath; } export { getTsConfigPath };