auto-fixed prefer-const violation

This commit is contained in:
Johannes
2022-06-08 17:49:21 +02:00
parent aa23a0dbb7
commit 0656d21d11
862 changed files with 6489 additions and 6489 deletions

View File

@@ -10,7 +10,7 @@ import { resolvePath } from '../requests';
export function getDocumentContext(documentUri: string, workspaceFolders: WorkspaceFolder[]): DocumentContext {
function getRootFolder(): string | undefined {
for (let folder of workspaceFolders) {
for (const folder of workspaceFolders) {
let folderURI = folder.uri;
if (!endsWith(folderURI, '/')) {
folderURI = folderURI + '/';
@@ -25,7 +25,7 @@ export function getDocumentContext(documentUri: string, workspaceFolders: Worksp
return {
resolveReference: (ref: string, base = documentUri) => {
if (ref[0] === '/') { // resolve absolute path against the current workspace folder
let folderUri = getRootFolder();
const folderUri = getRootFolder();
if (folderUri) {
return folderUri + ref.substr(1);
}