From 303c3ceb035c367553344aaaf734f448fb10e0ac Mon Sep 17 00:00:00 2001 From: nayounsang Date: Sat, 21 Jun 2025 20:04:17 +0900 Subject: [PATCH 1/2] test: add test case --- .../typescript-estree/tests/lib/inferSingleRun.test.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/typescript-estree/tests/lib/inferSingleRun.test.ts b/packages/typescript-estree/tests/lib/inferSingleRun.test.ts index 2fe53da89076..99089600d400 100644 --- a/packages/typescript-estree/tests/lib/inferSingleRun.test.ts +++ b/packages/typescript-estree/tests/lib/inferSingleRun.test.ts @@ -157,4 +157,12 @@ describe(inferSingleRun, () => { expect(actual).toBe(false); }); + + it('returns true for project service in single run', () => { + vi.stubEnv('CI', 'true'); + // Do not set `project: true` if `projectService: true` + const actual = inferSingleRun({ projectService: true }); + + expect(actual).toBe(true); + }); }); From a2e2d21991d6d70d69174ee65bd2b344f7c7926e Mon Sep 17 00:00:00 2001 From: nayounsang Date: Sat, 21 Jun 2025 20:04:38 +0900 Subject: [PATCH 2/2] fix: return true for project service in single run --- packages/typescript-estree/src/parseSettings/inferSingleRun.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/typescript-estree/src/parseSettings/inferSingleRun.ts b/packages/typescript-estree/src/parseSettings/inferSingleRun.ts index 8007e6ccd66a..36503db95a6b 100644 --- a/packages/typescript-estree/src/parseSettings/inferSingleRun.ts +++ b/packages/typescript-estree/src/parseSettings/inferSingleRun.ts @@ -24,7 +24,7 @@ export function inferSingleRun(options: TSESTreeOptions | undefined): boolean { if ( // single-run implies type-aware linting - no projects means we can't be in single-run mode - options?.project == null || + (options?.project == null && options?.projectService == null) || // programs passed via options means the user should be managing the programs, so we shouldn't // be creating our own single-run programs accidentally options.programs != null