Skip to content

Commit 4ff3240

Browse files
committed
lint
1 parent 41aecab commit 4ff3240

1 file changed

Lines changed: 0 additions & 31 deletions

File tree

src/harness/fourslashImpl.ts

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -4832,19 +4832,6 @@ function parseTestData(basePath: string, contents: string, fileName: string): Fo
48324832
}
48334833
}
48344834

4835-
// @Filename is the only directive that can be used in a test that contains tsconfig.json file.
4836-
// Wrong: the inferred project may contain files other than the ones covered by a tsconfig.json.
4837-
// const config = ts.find(files, isConfig);
4838-
// if (config) {
4839-
// let directive = getNonFileNameOptionInFileList(files);
4840-
// if (!directive) {
4841-
// directive = getNonFileNameOptionInObject(globalOptions);
4842-
// }
4843-
// if (directive) {
4844-
// throw Error(`It is not allowed to use ${config.fileName} along with directive '${directive}'`);
4845-
// }
4846-
// }
4847-
48484835
return {
48494836
markerPositions,
48504837
markers,
@@ -4859,24 +4846,6 @@ function isConfig(file: FourSlashFile): boolean {
48594846
return Harness.getConfigNameFromFileName(file.fileName) !== undefined;
48604847
}
48614848

4862-
function getNonFileNameOptionInFileList(files: FourSlashFile[]): string | undefined {
4863-
return ts.forEach(files, f => getNonFileNameOptionInObject(f.fileOptions));
4864-
}
4865-
4866-
function getNonFileNameOptionInObject(optionObject: { [s: string]: string; }): string | undefined {
4867-
for (const option in optionObject) {
4868-
switch (option) {
4869-
case MetadataOptionNames.fileName:
4870-
case MetadataOptionNames.baselineFile:
4871-
case MetadataOptionNames.emitThisFile:
4872-
break;
4873-
default:
4874-
return option;
4875-
}
4876-
}
4877-
return undefined;
4878-
}
4879-
48804849
const enum State {
48814850
none,
48824851
inSlashStarMarker,

0 commit comments

Comments
 (0)