Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(typescript-estree): add EXPERIMENTAL_useProjectService option to use TypeScript project service #6754

Merged
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
550465b
WIP: createProjectService
JoshuaKGoldberg Mar 24, 2023
6ea9f07
Merge branch 'v6' into create-project-service
JoshuaKGoldberg Apr 16, 2023
05f4d99
Collected updates: reuse program; lean more into tsserver
JoshuaKGoldberg Apr 16, 2023
1fed323
chore: fix website config.ts type checking
JoshuaKGoldberg Apr 16, 2023
ecd5d3d
Spell checking
JoshuaKGoldberg Apr 16, 2023
78f8c4a
remove .only
JoshuaKGoldberg Apr 17, 2023
76acaeb
Cleaned up todo comments in code and properly restrict new option
JoshuaKGoldberg Apr 18, 2023
a68dece
Added separate test run in CI for experimental option
JoshuaKGoldberg Apr 18, 2023
6f6f02a
fix: no node-version
JoshuaKGoldberg Apr 18, 2023
e43145f
Remove process.env manual set
JoshuaKGoldberg Apr 18, 2023
214fc8d
Fix linter config.ts
JoshuaKGoldberg Apr 18, 2023
a2f71a7
Tweaked project creation to try to explicitly set cwd
JoshuaKGoldberg Apr 18, 2023
4ffaffa
Progress on updating unit tests for absolute paths
JoshuaKGoldberg Apr 24, 2023
20d9f82
fix: add missing clearTSServerProjectService
JoshuaKGoldberg Apr 24, 2023
6ef8498
Add more path relativity fixes
JoshuaKGoldberg Apr 25, 2023
195462d
Lint fixes and watch program relativity
JoshuaKGoldberg Apr 25, 2023
0db7485
No, not always true
JoshuaKGoldberg Apr 25, 2023
b583bb3
Fix around semanticInfo.test.ts
JoshuaKGoldberg Apr 25, 2023
5b9ca22
Switch snapshot to inline
JoshuaKGoldberg Apr 25, 2023
a9aec01
perf: only openExternalProject once per project
JoshuaKGoldberg Apr 27, 2023
4ab1b3d
Merge branch 'v6' into create-project-service
JoshuaKGoldberg Apr 27, 2023
be6cc5d
Revert "perf: only openExternalProject once per project"
JoshuaKGoldberg Apr 27, 2023
80110c1
Reverted changes to allow alternate TSConfig names
JoshuaKGoldberg Apr 27, 2023
c326886
Remove project existence checking
JoshuaKGoldberg Apr 28, 2023
a5772e2
Add linting from root
JoshuaKGoldberg Apr 28, 2023
128837a
Refactor CI naming a bit, and bumping to MacOS image...
JoshuaKGoldberg Apr 28, 2023
4f52573
Alas, linting from root style runs out of memory
JoshuaKGoldberg Apr 28, 2023
b1da422
Added a test, why not
JoshuaKGoldberg Apr 28, 2023
814a8ad
fix: don't fall back to default program/project creation
JoshuaKGoldberg May 3, 2023
a5180c7
Fixed up more test exclusions
JoshuaKGoldberg May 3, 2023
37d3548
Move tsserver import to a require
JoshuaKGoldberg May 3, 2023
00ddecd
rename: tsserverType -> ts
JoshuaKGoldberg May 3, 2023
b5d76d4
Merge branch 'v6' into create-project-service
JoshuaKGoldberg May 8, 2023
da45669
Use path.resolve, and then simplify parserSettings usage
JoshuaKGoldberg Jun 13, 2023
69be30f
Merge branch 'main'
JoshuaKGoldberg Jul 12, 2023
93d369c
Remove unneeded typingsInstaller
JoshuaKGoldberg Jul 12, 2023
7e74202
Merge branch 'main' into create-project-service
JoshuaKGoldberg Jul 15, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/ci.yml
Expand Up @@ -192,6 +192,38 @@ jobs:
# Sadly 1 day is the minimum
retention-days: 1

unit_tests_tsserver:
name: Run Unit Tests with Experimental TSServer
needs: [build]
runs-on: ubuntu-latest
strategy:
matrix:
package:
[
'eslint-plugin',
'eslint-plugin-internal',
'eslint-plugin-tslint',
'typescript-estree',
]
env:
COLLECT_COVERAGE: false
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Install
uses: ./.github/actions/prepare-install
with:
node-version: 18
- name: Build
uses: ./.github/actions/prepare-build
- name: Run unit tests for ${{ matrix.package }}
run: npx nx test ${{ matrix.package }} --coverage=false
env:
CI: true
TYPESCRIPT_ESLINT_EXPERIMENTAL_TSSERVER: true
Comment on lines +196 to +226
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was a great thing to add!


website_build:
name: Build Website
needs: [install, build]
Expand Down
11 changes: 10 additions & 1 deletion docs/architecture/TypeScript-ESTree.mdx
Expand Up @@ -147,6 +147,15 @@ interface ParseAndGenerateServicesOptions extends ParseOptions {
*/
errorOnTypeScriptSyntacticAndSemanticIssues?: boolean;

/**
* ***EXPERIMENTAL FLAG*** - Use this at your own risk.
*
* Whether to create a shared TypeScript server to power program creation.
*
* @see https://github.com/typescript-eslint/typescript-eslint/issues/6575
*/
EXPERIMENTAL_useProjectService?: boolean;

/**
* ***EXPERIMENTAL FLAG*** - Use this at your own risk.
*
Expand All @@ -155,7 +164,7 @@ interface ParseAndGenerateServicesOptions extends ParseOptions {
*
* This flag REQUIRES at least TS v3.9, otherwise it does nothing.
*
* See: https://github.com/typescript-eslint/typescript-eslint/issues/2094
* @see https://github.com/typescript-eslint/typescript-eslint/issues/2094
*/
EXPERIMENTAL_useSourceOfProjectReferenceRedirect?: boolean;

Expand Down
1 change: 1 addition & 0 deletions packages/types/src/parser-options.ts
Expand Up @@ -47,6 +47,7 @@ interface ParserOptions {
debugLevel?: DebugLevel;
errorOnTypeScriptSyntacticAndSemanticIssues?: boolean;
errorOnUnknownASTType?: boolean;
EXPERIMENTAL_useProjectService?: boolean; // purposely undocumented for now
EXPERIMENTAL_useSourceOfProjectReferenceRedirect?: boolean; // purposely undocumented for now
extraFileExtensions?: string[];
filePath?: string;
Expand Down
Expand Up @@ -5,7 +5,6 @@ import * as ts from 'typescript';
import { firstDefined } from '../node-utils';
import type { ParseSettings } from '../parseSettings';
import { describeFilePath } from './describeFilePath';
import { getWatchProgramsForProjects } from './getWatchProgramsForProjects';
import type { ASTAndDefiniteProgram } from './shared';
import { getAstFromProgram } from './shared';

Expand All @@ -28,10 +27,10 @@ const DEFAULT_EXTRA_FILE_EXTENSIONS = [
*/
function createProjectProgram(
parseSettings: ParseSettings,
programsForProjects: readonly ts.Program[],
): ASTAndDefiniteProgram | undefined {
log('Creating project program for: %s', parseSettings.filePath);

const programsForProjects = getWatchProgramsForProjects(parseSettings);
const astAndProgram = firstDefined(programsForProjects, currentProgram =>
getAstFromProgram(currentProgram, parseSettings),
);
Expand Down
@@ -0,0 +1,55 @@
import * as tsserver from 'typescript/lib/tsserverlibrary';
JoshuaKGoldberg marked this conversation as resolved.
Show resolved Hide resolved

const doNothing = (): void => {};

const createStubFileWatcher = (): tsserver.FileWatcher => ({
close: doNothing,
});

export function createProjectService(): tsserver.server.ProjectService {

Check warning on line 9 in packages/typescript-estree/src/create-program/createProjectService.ts

View check run for this annotation

Codecov / codecov/patch

packages/typescript-estree/src/create-program/createProjectService.ts#L9

Added line #L9 was not covered by tests
// TODO: see getWatchProgramsForProjects
// We don't watch the disk, we just refer to these when ESLint calls us
// there's a whole separate update pass in maybeInvalidateProgram at the bottom of getWatchProgramsForProjects
// (this "goes nuclear on TypeScript")
const system: tsserver.server.ServerHost = {

Check warning on line 14 in packages/typescript-estree/src/create-program/createProjectService.ts

View check run for this annotation

Codecov / codecov/patch

packages/typescript-estree/src/create-program/createProjectService.ts#L14

Added line #L14 was not covered by tests
...tsserver.sys,
clearImmediate,
clearTimeout,
setImmediate,
setTimeout,
JoshuaKGoldberg marked this conversation as resolved.
Show resolved Hide resolved
watchDirectory: createStubFileWatcher,
watchFile: createStubFileWatcher,
};

const projectService = new tsserver.server.ProjectService({

Check warning on line 24 in packages/typescript-estree/src/create-program/createProjectService.ts

View check run for this annotation

Codecov / codecov/patch

packages/typescript-estree/src/create-program/createProjectService.ts#L24

Added line #L24 was not covered by tests
host: system,
cancellationToken: { isCancellationRequested: (): boolean => false },

Check warning on line 26 in packages/typescript-estree/src/create-program/createProjectService.ts

View check run for this annotation

Codecov / codecov/patch

packages/typescript-estree/src/create-program/createProjectService.ts#L26

Added line #L26 was not covered by tests
useSingleInferredProject: false,
useInferredProjectPerProjectRoot: false,
// TODO: https://github.com/microsoft/TypeScript/issues/53803
JoshuaKGoldberg marked this conversation as resolved.
Show resolved Hide resolved
typingsInstaller: {
JoshuaKGoldberg marked this conversation as resolved.
Show resolved Hide resolved
attach: (): void => {},
enqueueInstallTypingsRequest: (): void => {},
installPackage: (): Promise<never> => {
throw new Error('This should never be called.');

Check warning on line 34 in packages/typescript-estree/src/create-program/createProjectService.ts

View check run for this annotation

Codecov / codecov/patch

packages/typescript-estree/src/create-program/createProjectService.ts#L34

Added line #L34 was not covered by tests
},
isKnownTypesPackageName: () => false,

Check warning on line 36 in packages/typescript-estree/src/create-program/createProjectService.ts

View check run for this annotation

Codecov / codecov/patch

packages/typescript-estree/src/create-program/createProjectService.ts#L36

Added line #L36 was not covered by tests
onProjectClosed: (): void => {},
globalTypingsCacheLocation: '',
},
logger: {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably be good to wire this up to our debug output so we can toggle it on for verbose debugging purposes?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ooh good point. I'll leave that as a followup issue 👍 it'd be a good fodder for getting someone other than me involved in this area of code.

close: doNothing,
endGroup: doNothing,
getLogFileName: () => undefined,
hasLevel: () => false,

Check warning on line 44 in packages/typescript-estree/src/create-program/createProjectService.ts

View check run for this annotation

Codecov / codecov/patch

packages/typescript-estree/src/create-program/createProjectService.ts#L43-L44

Added lines #L43 - L44 were not covered by tests
info: doNothing,
loggingEnabled: () => false,

Check warning on line 46 in packages/typescript-estree/src/create-program/createProjectService.ts

View check run for this annotation

Codecov / codecov/patch

packages/typescript-estree/src/create-program/createProjectService.ts#L46

Added line #L46 was not covered by tests
msg: doNothing,
perftrc: doNothing,
startGroup: doNothing,
},
session: undefined,
});
JoshuaKGoldberg marked this conversation as resolved.
Show resolved Hide resolved

return projectService;

Check warning on line 54 in packages/typescript-estree/src/create-program/createProjectService.ts

View check run for this annotation

Codecov / codecov/patch

packages/typescript-estree/src/create-program/createProjectService.ts#L54

Added line #L54 was not covered by tests
}
@@ -1,6 +1,7 @@
import debug from 'debug';
import type * as ts from 'typescript';

import { createProjectService } from '../create-program/createProjectService';
import { ensureAbsolutePath } from '../create-program/shared';
import type { TSESTreeOptions } from '../parser-options';
import { isSourceFile } from '../source-files';
Expand All @@ -20,6 +21,9 @@ const log = debug(

let TSCONFIG_MATCH_CACHE: ExpiringCache<string, string> | null;

let TSSERVER_PROJECT_SERVICE: ReturnType<typeof createProjectService> | null =
JoshuaKGoldberg marked this conversation as resolved.
Show resolved Hide resolved
null;

export function createParseSettings(
code: string | ts.SourceFile,
options: Partial<TSESTreeOptions> = {},
Expand Down Expand Up @@ -47,6 +51,11 @@ export function createParseSettings(
: new Set(),
errorOnTypeScriptSyntacticAndSemanticIssues: false,
errorOnUnknownASTType: options.errorOnUnknownASTType === true,
EXPERIMENTAL_projectService:
options.EXPERIMENTAL_useProjectService === true ||
process.env.TYPESCRIPT_ESLINT_EXPERIMENTAL_TSSERVER === 'true'
? (TSSERVER_PROJECT_SERVICE ??= createProjectService())
: undefined,
EXPERIMENTAL_useSourceOfProjectReferenceRedirect:
options.EXPERIMENTAL_useSourceOfProjectReferenceRedirect === true,
extraFileExtensions:
Expand Down
8 changes: 8 additions & 0 deletions packages/typescript-estree/src/parseSettings/index.ts
@@ -1,4 +1,5 @@
import type * as ts from 'typescript';
import type * as tsserverlibrary from 'typescript/lib/tsserverlibrary';

import type { CanonicalPath } from '../create-program/shared';
import type { TSESTree } from '../ts-estree';
Expand Down Expand Up @@ -57,6 +58,13 @@ export interface MutableParseSettings {
*/
errorOnUnknownASTType: boolean;

/**
* Experimental: TypeScript server to power program creation.
*/
EXPERIMENTAL_projectService:
| tsserverlibrary.server.ProjectService
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will including this have a negative effect for those who are importing this, since now two big TS d.ts files will get loaded? Maybe not too many use this, but, I'm just thinking ahead.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I hope not! So far it hasn't hurt anything I've noticed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will actually leak out into the public types accidentally.
index has export { createProgramFromConfigFile as createProgram } from './create-program/useProvidedPrograms';, and ./create-program/useProvidedPrograms has declare function useProvidedPrograms(programInstances: Iterable<ts.Program>, parseSettings: ParseSettings): ASTAndProgram | undefined; - i.e. import type { ParseSettings } from '../parseSettings'

To properly isolate this Josh we'll probably want to refactor create-program/useProvidedPrograms into two files so that we don't import it from the index - i.e. just have createProgramFromConfigFile in its own file so that we don't leak the internal types.

I was poking around via unpkg but might be worth just double checking all of the paths with intellisense from a local build to double check that is the only place it leaks into index's dependency graph.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see what you mean - as a quicker / less change-y step, I just changed the parameters for these functions to be their own types (or just a string). How does that feel to you?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that fixes the issue, yeah because we no longer leak ParseSettings into a file that's imported via the index - meaning consumers won't ever implicitly load the tssserverlibrary defs.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was actually originally referring to the type checking, in that users of your API will type check TS's huge API twice.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any alternative that would prevent this from being visible externally, or is this definitely a requirement?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔 long-term I think we really want this to be visible externally. I want to investigate integrating with other project service consumers such as https://github.com/Quramy/typescript-eslint-language-service (cc @Quramy).

I don't think I follow what you mean by users of our API type checking the huge API twice - do you mean because if this file's .d.ts output is in the node_modules/ of projects, TypeScript (e.g. via tsc) will type check it?

If so: I suppose in theory we could hand-write a ProjectService type that coincidentally matches the tsserverlibrary.server.ProjectService type, with comments explaining why. Does that feel reasonable to you?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If someone imports @typescript-eslint/estree, they will then access the d.ts files for this, which then references both typescript and tsserverlibrary, and since they're not the same file and both large, it'll increase the check time of anyone who imports this package.

Probably I should revisit the "merge typescript and tsserverlibrary" idea, I had just been working on other stuff.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, got it thanks. I think this is fine for now. I'm under the impression that very few consumers import from any @typescript-eslint/* package (as you noted) - and it's mostly authors of custom rules. Good to note as a potential followup if someone reports anything.

| undefined;

/**
* Whether TS should use the source files for referenced projects instead of the compiled .d.ts files.
*
Expand Down
11 changes: 10 additions & 1 deletion packages/typescript-estree/src/parser-options.ts
Expand Up @@ -94,6 +94,15 @@ interface ParseAndGenerateServicesOptions extends ParseOptions {
*/
errorOnTypeScriptSyntacticAndSemanticIssues?: boolean;

/**
* ***EXPERIMENTAL FLAG*** - Use this at your own risk.
*
* Whether to create a shared TypeScript server to power program creation.
*
* @see https://github.com/typescript-eslint/typescript-eslint/issues/6575
*/
EXPERIMENTAL_useProjectService?: boolean;

/**
* ***EXPERIMENTAL FLAG*** - Use this at your own risk.
*
Expand All @@ -102,7 +111,7 @@ interface ParseAndGenerateServicesOptions extends ParseOptions {
*
* This flag REQUIRES at least TS v3.9, otherwise it does nothing.
*
* See: https://github.com/typescript-eslint/typescript-eslint/issues/2094
* @see https://github.com/typescript-eslint/typescript-eslint/issues/2094
*/
EXPERIMENTAL_useSourceOfProjectReferenceRedirect?: boolean;

Expand Down
45 changes: 30 additions & 15 deletions packages/typescript-estree/src/parser.ts
Expand Up @@ -10,6 +10,7 @@ import {
createNoProgram,
createSourceFile,
} from './create-program/createSourceFile';
import { getWatchProgramsForProjects } from './create-program/getWatchProgramsForProjects';
import type { ASTAndProgram, CanonicalPath } from './create-program/shared';
import {
createProgramFromConfigFile,
Expand All @@ -25,6 +26,7 @@ import type { ParseSettings } from './parseSettings';
import { createParseSettings } from './parseSettings/createParseSettings';
import { getFirstSemanticOrSyntacticError } from './semantic-or-syntactic-errors';
import type { TSESTree } from './ts-estree';
import { useProgramFromProjectService } from './useProgramFromProjectService';

const log = debug('typescript-eslint:typescript-estree:parser');

Expand Down Expand Up @@ -57,27 +59,40 @@ function getProgramAndAST(
}
}

if (hasFullTypeInformation) {
const fromProjectProgram = createProjectProgram(parseSettings);
if (fromProjectProgram) {
return fromProjectProgram;
// no need to waste time creating a program as the caller didn't want parser services
// so we can save time and just create a lonesome source file
if (!hasFullTypeInformation) {
return createNoProgram(parseSettings);
}

if (parseSettings.EXPERIMENTAL_projectService) {
const fromProjectService = useProgramFromProjectService(
parseSettings.EXPERIMENTAL_projectService,
parseSettings,
);
if (fromProjectService) {
return fromProjectService;
}
}

const fromProjectProgram = createProjectProgram(
parseSettings,
getWatchProgramsForProjects(parseSettings),
);
if (fromProjectProgram) {
return fromProjectProgram;
}

// eslint-disable-next-line deprecation/deprecation -- will be cleaned up with the next major
JoshuaKGoldberg marked this conversation as resolved.
Show resolved Hide resolved
if (parseSettings.DEPRECATED__createDefaultProgram) {
// eslint-disable-next-line deprecation/deprecation -- will be cleaned up with the next major
if (parseSettings.DEPRECATED__createDefaultProgram) {
// eslint-disable-next-line deprecation/deprecation -- will be cleaned up with the next major
const fromDefaultProgram = createDefaultProgram(parseSettings);
if (fromDefaultProgram) {
return fromDefaultProgram;
}
const fromDefaultProgram = createDefaultProgram(parseSettings);
if (fromDefaultProgram) {
return fromDefaultProgram;
}

return createIsolatedProgram(parseSettings);
}

// no need to waste time creating a program as the caller didn't want parser services
// so we can save time and just create a lonesome source file
return createNoProgram(parseSettings);
return createIsolatedProgram(parseSettings);
}

interface EmptyObject {}
Expand Down
34 changes: 34 additions & 0 deletions packages/typescript-estree/src/useProgramFromProjectService.ts
@@ -0,0 +1,34 @@
import type * as ts from 'typescript';
import type { server } from 'typescript/lib/tsserverlibrary';

import { createProjectProgram } from './create-program/createProjectProgram';
import type { ASTAndDefiniteProgram } from './create-program/shared';
import type { MutableParseSettings } from './parseSettings';

export function useProgramFromProjectService(

Check warning on line 8 in packages/typescript-estree/src/useProgramFromProjectService.ts

View check run for this annotation

Codecov / codecov/patch

packages/typescript-estree/src/useProgramFromProjectService.ts#L8

Added line #L8 was not covered by tests
projectService: server.ProjectService,
parseSettings: Readonly<MutableParseSettings>,
): ASTAndDefiniteProgram | undefined {
projectService.setCompilerOptionsForInferredProjects({

Check warning on line 12 in packages/typescript-estree/src/useProgramFromProjectService.ts

View check run for this annotation

Codecov / codecov/patch

packages/typescript-estree/src/useProgramFromProjectService.ts#L12

Added line #L12 was not covered by tests
rootDir: parseSettings.tsconfigRootDir,
});

projectService.openClientFile(

Check warning on line 16 in packages/typescript-estree/src/useProgramFromProjectService.ts

View check run for this annotation

Codecov / codecov/patch

packages/typescript-estree/src/useProgramFromProjectService.ts#L16

Added line #L16 was not covered by tests
parseSettings.filePath,
parseSettings.codeFullText,
/* scriptKind */ undefined,
parseSettings.tsconfigRootDir,
);
JoshuaKGoldberg marked this conversation as resolved.
Show resolved Hide resolved

const scriptInfo = projectService.getScriptInfo(parseSettings.filePath);
const program = projectService

Check warning on line 24 in packages/typescript-estree/src/useProgramFromProjectService.ts

View check run for this annotation

Codecov / codecov/patch

packages/typescript-estree/src/useProgramFromProjectService.ts#L23-L24

Added lines #L23 - L24 were not covered by tests
.getDefaultProjectForFile(scriptInfo!.fileName, true)!
.getLanguageService(/*ensureSynchronized*/ true)
bradzacher marked this conversation as resolved.
Show resolved Hide resolved
.getProgram();

if (!program) {
return undefined;

Check warning on line 30 in packages/typescript-estree/src/useProgramFromProjectService.ts

View check run for this annotation

Codecov / codecov/patch

packages/typescript-estree/src/useProgramFromProjectService.ts#L30

Added line #L30 was not covered by tests
}

return createProjectProgram(parseSettings, [program as ts.Program]);

Check warning on line 33 in packages/typescript-estree/src/useProgramFromProjectService.ts

View check run for this annotation

Codecov / codecov/patch

packages/typescript-estree/src/useProgramFromProjectService.ts#L33

Added line #L33 was not covered by tests
}
1 change: 1 addition & 0 deletions packages/website/src/components/linter/config.ts
Expand Up @@ -13,6 +13,7 @@ export const defaultParseSettings: ParseSettings = {
DEPRECATED__createDefaultProgram: false,
errorOnTypeScriptSyntacticAndSemanticIssues: false,
errorOnUnknownASTType: false,
EXPERIMENTAL_projectService: undefined,
EXPERIMENTAL_useSourceOfProjectReferenceRedirect: false,
extraFileExtensions: [],
filePath: '',
Expand Down