diff --git a/packages/typescript-estree/src/withoutProjectParserOptions.ts b/packages/typescript-estree/src/withoutProjectParserOptions.ts index e0298e0f5632..a58074f50361 100644 --- a/packages/typescript-estree/src/withoutProjectParserOptions.ts +++ b/packages/typescript-estree/src/withoutProjectParserOptions.ts @@ -12,10 +12,8 @@ export function withoutProjectParserOptions( opts: TSESTreeOptions, ): TSESTreeOptions { // eslint-disable-next-line @typescript-eslint/no-unused-vars -- The variables are meant to be omitted - const { EXPERIMENTAL_useProjectService, project, ...rest } = opts as Record< - string, - unknown - >; + const { EXPERIMENTAL_useProjectService, project, projectService, ...rest } = + opts as Record; return rest; } diff --git a/packages/typescript-estree/tests/lib/withoutProjectParserOptions.test.ts b/packages/typescript-estree/tests/lib/withoutProjectParserOptions.test.ts index 3748af039f29..9a7468f19dff 100644 --- a/packages/typescript-estree/tests/lib/withoutProjectParserOptions.test.ts +++ b/packages/typescript-estree/tests/lib/withoutProjectParserOptions.test.ts @@ -7,6 +7,7 @@ describe('withoutProjectParserOptions', () => { comment: true, EXPERIMENTAL_useProjectService: true, project: true, + projectService: true, } as TSESTreeOptions); expect(without).toEqual({ comment: true,