Skip to content

Commit

Permalink
chore(website): update link to getScriptKind base on changes from #5027
Browse files Browse the repository at this point in the history
  • Loading branch information
armano2 committed May 24, 2022
1 parent 7a90148 commit a46048a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/website-eslint/src/linter/linter.js
Expand Up @@ -13,4 +13,4 @@ export function createLinter() {
export { analyze } from '@typescript-eslint/scope-manager/dist/analyze';
export { visitorKeys } from '@typescript-eslint/visitor-keys/dist/visitor-keys';
export { astConverter } from '@typescript-eslint/typescript-estree/dist/ast-converter';
export { getScriptKind } from '@typescript-eslint/typescript-estree/dist/create-program/shared';
export { getScriptKind } from '@typescript-eslint/typescript-estree/dist/create-program/getScriptKind';
2 changes: 1 addition & 1 deletion packages/website-eslint/types/index.d.ts
Expand Up @@ -2,7 +2,7 @@ import type { TSESLint } from '@typescript-eslint/utils';

import { analyze } from '@typescript-eslint/scope-manager/dist/analyze';
import { astConverter } from '@typescript-eslint/typescript-estree/dist/ast-converter';
import { getScriptKind } from '@typescript-eslint/typescript-estree/dist/create-program/shared';
import { getScriptKind } from '@typescript-eslint/typescript-estree/dist/create-program/getScriptKind';

export interface LintUtils {
createLinter: () => TSESLint.Linter;
Expand Down
4 changes: 1 addition & 3 deletions packages/website/src/components/linter/CompilerHost.ts
@@ -1,8 +1,6 @@
import type { System, SourceFile, CompilerHost } from 'typescript';
import type { LintUtils } from '@typescript-eslint/website-eslint';

import { extra } from './config';

/**
* Creates an in-memory CompilerHost -which is essentially an extra wrapper to System
* which works with TypeScript objects - returns both a compiler host, and a way to add new SourceFile
Expand All @@ -29,7 +27,7 @@ export function createVirtualCompilerHost(
file,
languageVersionOrOptions,
true,
lintUtils.getScriptKind(extra, fileName),
lintUtils.getScriptKind(fileName, false),
);
}
return undefined;
Expand Down

0 comments on commit a46048a

Please sign in to comment.