diff --git a/project/src/callbacks/DialogueCallbacks.ts b/project/src/callbacks/DialogueCallbacks.ts index 63d15257..158c84dd 100644 --- a/project/src/callbacks/DialogueCallbacks.ts +++ b/project/src/callbacks/DialogueCallbacks.ts @@ -65,13 +65,13 @@ export class DialogueCallbacks implements OnUpdate DateTime: this.timeUtil.getTimestamp(), IsDeveloper: true, Regions: ["EUR"], - "VersionId": "bgkidft87ddd", - "Ip": "", - "Port": 0, - "Chats": [ + VersionId: "bgkidft87ddd", + Ip: "", + Port: 0, + Chats: [ { - "_id": "0", - "Members": 0 + _id: "0", + Members: 0 } ] }; diff --git a/project/src/callbacks/ProfileCallbacks.ts b/project/src/callbacks/ProfileCallbacks.ts index 0aba65d6..d461aa44 100644 --- a/project/src/callbacks/ProfileCallbacks.ts +++ b/project/src/callbacks/ProfileCallbacks.ts @@ -109,7 +109,7 @@ export class ProfileCallbacks return this.httpResponse.getBody(null, 256, "256 - "); } - return this.httpResponse.getBody({ "status": "ok" }); + return this.httpResponse.getBody({ status: "ok" }); } /** @@ -131,12 +131,12 @@ export class ProfileCallbacks maxPveCountExceeded: false, profiles: [ { - "profileid": `scav${sessionID}`, + profileid: `scav${sessionID}`, profileToken: null, - "status": "Free", - "sid": "", - "ip": "", - "port": 0, + status: "Free", + sid: "", + ip: "", + port: 0, version: "live", location: "bigmap", raidMode: "Online", @@ -145,12 +145,12 @@ export class ProfileCallbacks }, { - "profileid": `pmc${sessionID}`, + profileid: `pmc${sessionID}`, profileToken: null, - "status": "Free", - "sid": "", - "ip": "", - "port": 0 + status: "Free", + sid: "", + ip: "", + port: 0 } ] }; diff --git a/project/src/controllers/DialogueController.ts b/project/src/controllers/DialogueController.ts index 21c3a2f4..d50471a2 100644 --- a/project/src/controllers/DialogueController.ts +++ b/project/src/controllers/DialogueController.ts @@ -62,9 +62,9 @@ export class DialogueController { // Force a fake friend called SPT into friend list return { - "Friends": [this.getSptFriendData()], - "Ignore": [], - "InIgnoreList": [] + Friends: [this.getSptFriendData()], + Ignore: [], + InIgnoreList: [] }; } diff --git a/project/src/controllers/HideoutController.ts b/project/src/controllers/HideoutController.ts index e14c37d7..c7f58e1b 100644 --- a/project/src/controllers/HideoutController.ts +++ b/project/src/controllers/HideoutController.ts @@ -652,7 +652,10 @@ export class HideoutController let counterHoursCrafting = pmcData.BackendCounters[HideoutController.nameBackendCountersCrafting]; if (!counterHoursCrafting) { - pmcData.BackendCounters[HideoutController.nameBackendCountersCrafting] = { "id": HideoutController.nameBackendCountersCrafting, "value": 0 }; + pmcData.BackendCounters[HideoutController.nameBackendCountersCrafting] = { + id: HideoutController.nameBackendCountersCrafting, + value: 0 + }; counterHoursCrafting = pmcData.BackendCounters[HideoutController.nameBackendCountersCrafting]; } let hoursCrafting = counterHoursCrafting.value; @@ -856,10 +859,10 @@ export class HideoutController public handleQTEEventOutcome(sessionId: string, pmcData: IPmcData, request: IHandleQTEEventRequestData): IItemEventRouterResponse { // { - // "Action": "HideoutQuickTimeEvent", - // "results": [true, false, true, true, true, true, true, true, true, false, false, false, false, false, false], - // "id": "63b16feb5d012c402c01f6ef", - // "timestamp": 1672585349 + // Action: "HideoutQuickTimeEvent", + // results: [true, false, true, true, true, true, true, true, true, false, false, false, false, false, false], + // id: "63b16feb5d012c402c01f6ef", + // timestamp: 1672585349 // } // Skill changes are done in diff --git a/project/src/controllers/InventoryController.ts b/project/src/controllers/InventoryController.ts index 73ab6778..23f5a5b4 100644 --- a/project/src/controllers/InventoryController.ts +++ b/project/src/controllers/InventoryController.ts @@ -434,7 +434,7 @@ export class InventoryController { if (item._id && item._id === body.item) { - item.upd.Foldable = { "Folded": body.value }; + item.upd.Foldable = { Folded: body.value }; return this.eventOutputHolder.getOutput(sessionID); } } diff --git a/project/src/controllers/LauncherController.ts b/project/src/controllers/LauncherController.ts index 0e7bd5fb..6ead15e3 100644 --- a/project/src/controllers/LauncherController.ts +++ b/project/src/controllers/LauncherController.ts @@ -53,7 +53,7 @@ export class LauncherController protected getProfileDescriptions(): Record { return { - "Standard": this.localisationService.getText("launcher-profile_standard"), + Standard: this.localisationService.getText("launcher-profile_standard"), // eslint-disable-next-line @typescript-eslint/naming-convention "Left Behind": this.localisationService.getText("launcher-profile_leftbehind"), // eslint-disable-next-line @typescript-eslint/naming-convention diff --git a/project/src/controllers/MatchController.ts b/project/src/controllers/MatchController.ts index 319fe499..b0135193 100644 --- a/project/src/controllers/MatchController.ts +++ b/project/src/controllers/MatchController.ts @@ -109,17 +109,17 @@ export class MatchController // get list of players joining into the match output.profiles.push({ - "profileid": "TODO", + profileid: "TODO", profileToken: "TODO", - "status": "MatchWait", - "sid": "", - "ip": "", - "port": 0, - "version": "live", - "location": "TODO get location", + status: "MatchWait", + sid: "", + ip: "", + port: 0, + version: "live", + location: "TODO get location", raidMode: "Online", - "mode": "deathmatch", - "shortid": null, + mode: "deathmatch", + shortid: null, // eslint-disable-next-line @typescript-eslint/naming-convention additional_info: null }); diff --git a/project/src/controllers/QuestController.ts b/project/src/controllers/QuestController.ts index e5046c93..dd402187 100644 --- a/project/src/controllers/QuestController.ts +++ b/project/src/controllers/QuestController.ts @@ -740,7 +740,7 @@ export class QuestController let index = pmcData.Inventory.items.length; // Important: don't tell the client to remove the attachments, it will handle it - output.profileChanges[sessionID].items.del.push({ "_id": itemHandover.id }); + output.profileChanges[sessionID].items.del.push({ _id: itemHandover.id }); // Important: loop backward when removing items from the array we're looping on while (index-- > 0) @@ -805,8 +805,9 @@ export class QuestController } pmcData.BackendCounters[conditionId] = { - "id": conditionId, - "qid": questId, - "value": counterValue }; + id: conditionId, + qid: questId, + value: counterValue + }; } } \ No newline at end of file diff --git a/project/src/generators/BotEquipmentModGenerator.ts b/project/src/generators/BotEquipmentModGenerator.ts index eaffe1e6..04cb0194 100644 --- a/project/src/generators/BotEquipmentModGenerator.ts +++ b/project/src/generators/BotEquipmentModGenerator.ts @@ -613,10 +613,10 @@ export class BotEquipmentModGenerator protected createModItem(modId: string, modTpl: string, parentId: string, modSlot: string, modTemplate: ITemplateItem, botRole: string): Item { return { - "_id": modId, - "_tpl": modTpl, - "parentId": parentId, - "slotId": modSlot, + _id: modId, + _tpl: modTpl, + parentId: parentId, + slotId: modSlot, ...this.botGeneratorHelper.generateExtraPropertiesForItem(modTemplate, botRole) }; } diff --git a/project/src/generators/BotInventoryGenerator.ts b/project/src/generators/BotInventoryGenerator.ts index 7ff178ba..6da1395a 100644 --- a/project/src/generators/BotInventoryGenerator.ts +++ b/project/src/generators/BotInventoryGenerator.ts @@ -98,24 +98,24 @@ export class BotInventoryGenerator return { items: [ { - "_id": equipmentId, - "_tpl": equipmentTpl + _id: equipmentId, + _tpl: equipmentTpl }, { - "_id": stashId, - "_tpl": stashTpl + _id: stashId, + _tpl: stashTpl }, { - "_id": questRaidItemsId, - "_tpl": questRaidItemsTpl + _id: questRaidItemsId, + _tpl: questRaidItemsTpl }, { - "_id": questStashItemsId, - "_tpl": questStashItemsTpl + _id: questStashItemsId, + _tpl: questStashItemsTpl }, { - "_id": sortingTableId, - "_tpl": sortingTableTpl + _id: sortingTableId, + _tpl: sortingTableTpl } ], equipment: equipmentId, @@ -223,10 +223,10 @@ export class BotInventoryGenerator } const item = { - "_id": id, - "_tpl": equipmentItemTpl, - "parentId": inventory.equipment, - "slotId": equipmentSlot, + _id: id, + _tpl: equipmentItemTpl, + parentId: inventory.equipment, + slotId: equipmentSlot, ...this.botGeneratorHelper.generateExtraPropertiesForItem(itemTemplate[1], botRole) }; diff --git a/project/src/generators/BotWeaponGenerator.ts b/project/src/generators/BotWeaponGenerator.ts index 0708c56f..b3010744 100644 --- a/project/src/generators/BotWeaponGenerator.ts +++ b/project/src/generators/BotWeaponGenerator.ts @@ -261,8 +261,8 @@ export class BotWeaponGenerator const parentItem = preset._items[0]; preset._items[0] = { ...parentItem, ...{ - "parentId": weaponParentId, - "slotId": equipmentSlot, + parentId: weaponParentId, + slotId: equipmentSlot, ...this.botGeneratorHelper.generateExtraPropertiesForItem(itemTemplate, botRole) } }; diff --git a/project/src/generators/LocationGenerator.ts b/project/src/generators/LocationGenerator.ts index 5f185851..af25d0d3 100644 --- a/project/src/generators/LocationGenerator.ts +++ b/project/src/generators/LocationGenerator.ts @@ -372,7 +372,7 @@ export class LocationGenerator const rotation = result.rotation ? 1 : 0; items[0].slotId = "main"; - items[0].location = { "x": result.x, "y": result.y, "r": rotation }; + items[0].location = { x: result.x, y: result.y, r: rotation }; // Add loot to container before returning for (const item of items) diff --git a/project/src/generators/RagfairOfferGenerator.ts b/project/src/generators/RagfairOfferGenerator.ts index 6cf20278..612b71c2 100644 --- a/project/src/generators/RagfairOfferGenerator.ts +++ b/project/src/generators/RagfairOfferGenerator.ts @@ -635,36 +635,36 @@ export class RagfairOfferGenerator if (isRepairable && props.Durability > 0) { item.upd.Repairable = { - "Durability": props.Durability, - "MaxDurability": props.Durability + Durability: props.Durability, + MaxDurability: props.Durability }; } if (isMedkit && props.MaxHpResource > 0) { item.upd.MedKit = { - "HpResource": props.MaxHpResource + HpResource: props.MaxHpResource }; } if (isKey) { item.upd.Key = { - "NumberOfUsages": 0 + NumberOfUsages: 0 }; } if (isConsumable) { item.upd.FoodDrink = { - "HpPercent": props.MaxResource + HpPercent: props.MaxResource }; } if (isRepairKit) { item.upd.RepairKit = { - "Resource": props.MaxRepairResource + Resource: props.MaxRepairResource }; } diff --git a/project/src/generators/RepeatableQuestGenerator.ts b/project/src/generators/RepeatableQuestGenerator.ts index f85fe623..c0795a99 100644 --- a/project/src/generators/RepeatableQuestGenerator.ts +++ b/project/src/generators/RepeatableQuestGenerator.ts @@ -142,10 +142,10 @@ export class RepeatableQuestGenerator // a random combination of listed conditions can be required // possible conditions elements and their relative probability can be defined in QuestConfig.js // We use ProbabilityObjectArray to draw by relative probability. e.g. for targets: - // "targets": { - // "Savage": 7, - // "AnyPmc": 2, - // "bossBully": 0.5 + // targets: { + // Savage: 7, + // AnyPmc: 2, + // bossBully: 0.5 //} // higher is more likely. We define the difficulty to be the inverse of the relative probability. @@ -467,7 +467,7 @@ export class RepeatableQuestGenerator itemSelection = itemSelection.filter(x => this.itemHelper.getItemPrice(x[0]) < roublesBudget); // We also have the option to use whitelist and/or blacklist which is defined in repeatableQuests.json as - // [{"minPlayerLevel": 1, "itemIds": ["id1",...]}, {"minPlayerLevel": 15, "itemIds": ["id3",...]}] + // [{minPlayerLevel: 1, itemIds: ["id1",...]}, {minPlayerLevel: 15, itemIds: ["id3",...]}] if (repeatableConfig.questConfig.Completion.useWhitelist) { const itemWhitelist = this.databaseServer.getTables().templates.repeatableQuests.data.Completion.itemsWhitelist; diff --git a/project/src/helpers/BotWeaponGeneratorHelper.ts b/project/src/helpers/BotWeaponGeneratorHelper.ts index d84037c0..5493198c 100644 --- a/project/src/helpers/BotWeaponGeneratorHelper.ts +++ b/project/src/helpers/BotWeaponGeneratorHelper.ts @@ -118,7 +118,7 @@ export class BotWeaponGeneratorHelper const ammoItems = this.itemHelper.splitStack({ _id: this.hashUtil.generate(), _tpl: ammoTpl, - upd: { "StackObjectsCount": cartridgeCount } + upd: { StackObjectsCount: cartridgeCount } }); for (const ammoItem of ammoItems) diff --git a/project/src/helpers/HideoutHelper.ts b/project/src/helpers/HideoutHelper.ts index dba759df..7be211db 100644 --- a/project/src/helpers/HideoutHelper.ts +++ b/project/src/helpers/HideoutHelper.ts @@ -753,7 +753,7 @@ export class HideoutHelper _id: this.hashUtil.generate(), _tpl: "59faff1d86f7746c51718c9c", upd: { - "StackObjectsCount": 1 + StackObjectsCount: 1 } }); diff --git a/project/src/helpers/HttpServerHelper.ts b/project/src/helpers/HttpServerHelper.ts index 19a85a34..613bfa9e 100644 --- a/project/src/helpers/HttpServerHelper.ts +++ b/project/src/helpers/HttpServerHelper.ts @@ -10,15 +10,15 @@ export class HttpServerHelper protected httpConfig: IHttpConfig; protected mime = { - "css": "text/css", - "bin": "application/octet-stream", - "html": "text/html", - "jpg": "image/jpeg", - "js": "text/javascript", - "json": "application/json", - "png": "image/png", - "svg": "image/svg+xml", - "txt": "text/plain" + css: "text/css", + bin: "application/octet-stream", + html: "text/html", + jpg: "image/jpeg", + js: "text/javascript", + json: "application/json", + png: "image/png", + svg: "image/svg+xml", + txt: "text/plain" }; constructor( diff --git a/project/src/helpers/InventoryHelper.ts b/project/src/helpers/InventoryHelper.ts index 455f38f5..a8843b33 100644 --- a/project/src/helpers/InventoryHelper.ts +++ b/project/src/helpers/InventoryHelper.ts @@ -788,13 +788,12 @@ export class InventoryHelper protected getInventoryItemHash(inventoryItem: Item[]): InventoryHelper.InventoryItemHash { const inventoryItemHash: InventoryHelper.InventoryItemHash = { - "byItemId": {}, - "byParentId": {} + byItemId: {}, + byParentId: {} }; - for (let i = 0; i < inventoryItem.length; i++) + for (const item of inventoryItem) { - const item = inventoryItem[i]; inventoryItemHash.byItemId[item._id] = item; if (!("parentId" in item)) diff --git a/project/src/helpers/ItemHelper.ts b/project/src/helpers/ItemHelper.ts index 85d4a49b..d34785b8 100644 --- a/project/src/helpers/ItemHelper.ts +++ b/project/src/helpers/ItemHelper.ts @@ -192,27 +192,27 @@ class ItemHelper * AmmoBoxes contain StackSlots which need to be filled for the AmmoBox to have content. * Here's what a filled AmmoBox looks like: * { - * "_id": "b1bbe982daa00ac841d4ae4d", - * "_tpl": "57372c89245977685d4159b1", - * "parentId": "5fe49a0e2694b0755a504876", - * "slotId": "hideout", - * "location": { - * "x": 3, - * "y": 4, - * "r": 0 + * _id: "b1bbe982daa00ac841d4ae4d", + * _tpl: "57372c89245977685d4159b1", + * parentId: "5fe49a0e2694b0755a504876", + * slotId: "hideout", + * location: { + * x: 3, + * y: 4, + * r: 0 * }, - * "upd": { - * "StackObjectsCount": 1 + * upd: { + * StackObjectsCount: 1 * } * }, * { - * "_id": "b997b4117199033afd274a06", - * "_tpl": "56dff061d2720bb5668b4567", - * "parentId": "b1bbe982daa00ac841d4ae4d", - * "slotId": "cartridges", - * "location": 0, - * "upd": { - * "StackObjectsCount": 30 + * _id: "b997b4117199033afd274a06", + * _tpl: "56dff061d2720bb5668b4567", + * parentId: "b1bbe982daa00ac841d4ae4d", + * slotId: "cartridges", + * location: 0, + * upd: { + * StackObjectsCount: 30 * } * } * Given the AmmoBox Item (first object) this function generates the StackSlot (second object) and returns it. diff --git a/project/src/helpers/ProfileHelper.ts b/project/src/helpers/ProfileHelper.ts index 8ad71cd3..74576d48 100644 --- a/project/src/helpers/ProfileHelper.ts +++ b/project/src/helpers/ProfileHelper.ts @@ -211,7 +211,7 @@ export class ProfileHelper public getDefaultAkiDataObject(): any { return { - "version": this.getServerVersion() + version: this.getServerVersion() }; } diff --git a/project/src/helpers/QuestHelper.ts b/project/src/helpers/QuestHelper.ts index 2ea06add..f87daba9 100644 --- a/project/src/helpers/QuestHelper.ts +++ b/project/src/helpers/QuestHelper.ts @@ -532,7 +532,7 @@ export class QuestHelper { // this case is probably dead Code right now, since the only calling function // checks explicitly for Value > 0. - output.profileChanges[sessionID].items.del.push({ "_id": itemId }); + output.profileChanges[sessionID].items.del.push({ _id: itemId }); pmcData.Inventory.items.splice(inventoryItemIndex, 1); } } @@ -546,12 +546,14 @@ export class QuestHelper protected addItemStackSizeChangeIntoEventResponse(output: IItemEventRouterResponse, sessionId: string, item: Item): void { output.profileChanges[sessionId].items.change.push({ - "_id": item._id, - "_tpl": item._tpl, - "parentId": item.parentId, - "slotId": item.slotId, - "location": item.location, - "upd": { "StackObjectsCount": item.upd.StackObjectsCount } + _id: item._id, + _tpl: item._tpl, + parentId: item.parentId, + slotId: item.slotId, + location: item.location, + upd: { + StackObjectsCount: item.upd.StackObjectsCount + } }); } diff --git a/project/src/models/eft/match/IGetRaidConfigurationRequestData.ts b/project/src/models/eft/match/IGetRaidConfigurationRequestData.ts index f01a2697..87bc3791 100644 --- a/project/src/models/eft/match/IGetRaidConfigurationRequestData.ts +++ b/project/src/models/eft/match/IGetRaidConfigurationRequestData.ts @@ -13,32 +13,32 @@ export interface IGetRaidConfigurationRequestData } // { -// "keyId": "", -// "side": "Pmc", -// "location": "factory4_day", -// "timeVariant": "CURR", or "PAST" -// "raidMode": "Local", -// "metabolismDisabled": false, -// "playersSpawnPlace": "SamePlace", -// "timeAndWeatherSettings": { -// "isRandomTime": false, -// "isRandomWeather": false, -// "cloudinessType": "Clear", -// "rainType": "NoRain", -// "windType": "Light", -// "fogType": "NoFog", -// "timeFlowType": "x1", -// "hourOfDay": -1 +// keyId: "", +// side: "Pmc", +// location: "factory4_day", +// timeVariant: "CURR", or "PAST" +// raidMode: "Local", +// metabolismDisabled: false, +// playersSpawnPlace: "SamePlace", +// timeAndWeatherSettings: { +// isRandomTime: false, +// isRandomWeather: false, +// cloudinessType: "Clear", +// rainType: "NoRain", +// windType: "Light", +// fogType: "NoFog", +// timeFlowType: "x1", +// hourOfDay: -1 // }, -// "botSettings": { -// "isScavWars": false, -// "botAmount": "AsOnline" +// botSettings: { +// isScavWars: false, +// botAmount: "AsOnline" // }, -// "wavesSettings": { -// "botAmount": "AsOnline", -// "botDifficulty": "AsOnline", -// "isBosses": true, -// "isTaggedAndCursed": false +// wavesSettings: { +// botAmount: "AsOnline", +// botDifficulty: "AsOnline", +// isBosses: true, +// isTaggedAndCursed: false // } // } diff --git a/project/src/servers/WebSocketServer.ts b/project/src/servers/WebSocketServer.ts index 002b10c8..678c093d 100644 --- a/project/src/servers/WebSocketServer.ts +++ b/project/src/servers/WebSocketServer.ts @@ -40,7 +40,7 @@ export class WebSocketServer public setupWebSocket(httpServer: http.Server): void { const webSocketServer = new WebSocket.Server({ - "server": httpServer + server: httpServer }); webSocketServer.addListener("listening", () => diff --git a/project/src/services/MatchLocationService.ts b/project/src/services/MatchLocationService.ts index ad29293c..cba086c6 100644 --- a/project/src/services/MatchLocationService.ts +++ b/project/src/services/MatchLocationService.ts @@ -18,25 +18,25 @@ export class MatchLocationService const groupID = "test"; this.locations[info.location].groups[groupID] = { - "_id": groupID, - "owner": `pmc${sessionID}`, - "location": info.location, - "gameVersion": "live", - "region": "EUR", - "status": "wait", - "isSavage": false, - "timeShift": "CURR", - "dt": this.timeUtil.getTimestamp(), - "players": [ + _id: groupID, + owner: `pmc${sessionID}`, + location: info.location, + gameVersion: "live", + region: "EUR", + status: "wait", + isSavage: false, + timeShift: "CURR", + dt: this.timeUtil.getTimestamp(), + players: [ { - "_id": `pmc${sessionID}`, - "region": "EUR", - "ip": "127.0.0.1", - "savageId": `scav${sessionID}`, - "accessKeyId": "" + _id: `pmc${sessionID}`, + region: "EUR", + ip: "127.0.0.1", + savageId: `scav${sessionID}`, + accessKeyId: "" } ], - "customDataCenter": [] + customDataCenter: [] }; return this.locations[info.location].groups[groupID]; diff --git a/project/src/utils/RandomUtil.ts b/project/src/utils/RandomUtil.ts index 1ef6f403..e0cf76b1 100644 --- a/project/src/utils/RandomUtil.ts +++ b/project/src/utils/RandomUtil.ts @@ -365,16 +365,16 @@ export class RandomUtil if (max < min) { throw { - "name": "Invalid arguments", - "message": `Bounded random number generation max is smaller than min (${max} < ${min})` + name: "Invalid arguments", + message: `Bounded random number generation max is smaller than min (${max} < ${min})` }; } if (n < 1) { throw { - "name": "Invalid argument", - "message": `'n' must be 1 or greater (received ${n})` + name: "Invalid argument", + message: `'n' must be 1 or greater (received ${n})` }; } diff --git a/project/src/utils/VFS.ts b/project/src/utils/VFS.ts index d2ed724e..bf0f49ca 100644 --- a/project/src/utils/VFS.ts +++ b/project/src/utils/VFS.ts @@ -82,14 +82,14 @@ export class VFS public createDir(filepath: string): void { - fs.mkdirSync(filepath.substr(0, filepath.lastIndexOf("/")), { "recursive": true }); + fs.mkdirSync(filepath.substr(0, filepath.lastIndexOf("/")), { recursive: true }); } public async createDirAsync(filepath: string): Promise { const command = { uuid: crypto.randomUUID(), - cmd: async () => await this.mkdirPromisify(filepath.substr(0, filepath.lastIndexOf("/")), { "recursive": true }) + cmd: async () => await this.mkdirPromisify(filepath.substr(0, filepath.lastIndexOf("/")), { recursive: true }) }; await this.asyncQueue.waitFor(command); } @@ -167,7 +167,7 @@ export class VFS public writeFile(filepath: any, data = "", append = false, atomic = true): void { - const options = (append) ? { "flag": "a" } : { "flag": "w" }; + const options = append ? { flag: "a" } : { flag: "w" }; if (!this.exists(filepath)) { @@ -194,7 +194,7 @@ export class VFS public async writeFileAsync(filepath: any, data = "", append = false, atomic = true): Promise { - const options = (append) ? { "flag": "a" } : { "flag": "w" }; + const options = append ? { flag: "a" } : { flag: "w" }; if (!await this.exists(filepath)) {