Skip to content

Commit

Permalink
Fin linter issues
Browse files Browse the repository at this point in the history
  • Loading branch information
lumaxis committed Feb 14, 2022
1 parent 4ea969d commit 2f0ea37
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/web/test/suite/documentHelpers.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ import { Range, TextDocument } from 'vscode';
import { adjustedRangeWithMinimumIndentation, contentOfLinesWithAdjustedIndentation, endOfLineCharacter, linesForIndexes, minimumIndentationForLineIndexes } from '../../../lib/documentHelpers';

const fixtureUri = (fileName: string) => {
const workspaceFolder = vscode.workspace.workspaceFolders![0];
const workspaceFolder = vscode.workspace.workspaceFolders?.[0];
if (!workspaceFolder) { throw new Error('No workspace folder found'); }

return vscode.Uri.joinPath(workspaceFolder.uri, fileName);
};

Expand Down
4 changes: 3 additions & 1 deletion src/web/test/suite/textHelpers.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ import { generateCopyableText, generateSnippet, includeLanguageIdentifier, isMar
import { ExtensionConfig } from '../../../types/config';

const fixtureUri = (fileName: string) => {
const workspaceFolder = vscode.workspace.workspaceFolders![0];
const workspaceFolder = vscode.workspace.workspaceFolders?.[0];
if (!workspaceFolder) { throw new Error('No workspace folder found'); }

return vscode.Uri.joinPath(workspaceFolder.uri, fileName);
};

Expand Down

0 comments on commit 2f0ea37

Please sign in to comment.