Skip to content

Commit cb13ae0

Browse files
author
Arthur Ozga
committed
Pass linting
1 parent 8573631 commit cb13ae0

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

src/services/completions.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -326,18 +326,18 @@ namespace ts.Completions {
326326
* Given a path ending at a directory, gets the completions for the path, and filters for those entries containing the basename.
327327
*/
328328
function getCompletionEntriesForDirectoryFragment(fragment: string, scriptPath: string, extensions: string[], includeExtensions: boolean, span: TextSpan, exclude?: string, result: CompletionEntry[] = []): CompletionEntry[] {
329-
if(fragment === undefined) { fragment = "./"; } // TODO: (arozga) remove the second check along with adding --strictNullChecks
330-
329+
if (fragment === undefined) { fragment = "./"; } // TODO: (arozga) remove the second check along with adding --strictNullChecks
330+
331331
fragment = normalizeSlashes(fragment);
332332

333333
const baseName = getBaseFileName(fragment); // TODO: brittle?
334334

335335
// Remove the basename from our directory path
336336
// TODO: (arozga) when is that used for filtering options later?
337337
fragment = getDirectoryPath(fragment);
338-
339-
if (fragment === "") {
340-
fragment = '.' + directorySeparator; // TODO: (arozga) can we remove this?
338+
339+
if (fragment === "") {
340+
fragment = "." + directorySeparator; // TODO: (arozga) can we remove this?
341341
}
342342

343343
fragment = ensureTrailingDirectorySeparator(fragment); // TODO: why is this necessary?
@@ -577,7 +577,11 @@ namespace ts.Completions {
577577
};
578578
}
579579

580-
return undefined;
580+
return {
581+
isMemberCompletion: false,
582+
isNewIdentifierLocation: false,
583+
entries: []
584+
};
581585
}
582586

583587
function getCompletionEntriesFromTypings(host: LanguageServiceHost, options: CompilerOptions, scriptPath: string, span: TextSpan, result: CompletionEntry[] = []): CompletionEntry[] {

0 commit comments

Comments
 (0)