VScode syntax auto-improvements

This commit is contained in:
Alexander Cerutti
2020-09-05 22:33:34 +02:00
parent f171b93977
commit 7e528f57a7

View File

@@ -148,7 +148,7 @@ export async function getModelFolderContents(model: string): Promise<Partitioned
} }
const fileComponents = file.split(path.sep); const fileComponents = file.split(path.sep);
const fileName = fileComponents[fileComponents.length-1]; const fileName = fileComponents[fileComponents.length - 1];
return { ...acc, [fileName]: buffers[index] }; return { ...acc, [fileName]: buffers[index] };
}, {}) }, {})
@@ -177,7 +177,7 @@ export async function getModelFolderContents(model: string): Promise<Partitioned
const pathContents = (err.path as string).split(/(\/|\\\?)/); const pathContents = (err.path as string).split(/(\/|\\\?)/);
throw new Error(formatMessage( throw new Error(formatMessage(
"MODELF_FILE_NOT_FOUND", "MODELF_FILE_NOT_FOUND",
pathContents[pathContents.length-1] pathContents[pathContents.length - 1]
)) ))
} }
} }
@@ -217,7 +217,7 @@ export function getModelBufferContents(model: BundleUnit): PartitionedBundle {
} }
// separing localization folders from bundle files // separing localization folders from bundle files
const [ l10nBundle, bundle ] = splitBufferBundle(rawBundle); const [l10nBundle, bundle] = splitBufferBundle(rawBundle);
return { return {
bundle, bundle,
@@ -259,7 +259,7 @@ export async function readCertificatesFromOptions(options: Certificates): Promis
if (!!path.parse(content).ext) { if (!!path.parse(content).ext) {
// The content is a path to the document // The content is a path to the document
return readFile(path.resolve(content), { encoding: "utf8"}); return readFile(path.resolve(content), { encoding: "utf8" });
} else { } else {
// Content is the real document content // Content is the real document content
return Promise.resolve(content); return Promise.resolve(content);