diff --git a/src/004-base/arcologyBuilding.js b/src/004-base/arcologyBuilding.js index e596b090e05544c2e994854a83e02f107ab581bb..72518f5534887576f354236cbd56026db8c957b9 100644 --- a/src/004-base/arcologyBuilding.js +++ b/src/004-base/arcologyBuilding.js @@ -237,7 +237,7 @@ App.Arcology.Cell.BaseCell = class extends App.Entity.Serializable { // BC code } - /** @return {App.Arcology.Cell.BaseCell} */ + /** @returns {App.Arcology.Cell.BaseCell} */ clone() { return new App.Arcology.Cell.BaseCell(this.owner)._init(this); } diff --git a/src/descriptions/familySummaries.js b/src/descriptions/familySummaries.js index dd7b45d6fa77566f651aa9a7319ee3d47cf5cb11..f46d88c11776178917116fd91cec4750a7decdbf 100644 --- a/src/descriptions/familySummaries.js +++ b/src/descriptions/familySummaries.js @@ -53,6 +53,7 @@ App.Desc.family = (function() { if (character === V.PC) { return PCFamilySummary(); } else { + // FIXME: Argument of type 'HumanState' is not assignable to parameter of type 'SlaveState'. return slaveFamilySummary(character); } } @@ -497,7 +498,7 @@ App.Desc.family = (function() { } else if (slave.inbreedingCoeff >= 0.25) { r.push("very"); } else if (slave.inbreedingCoeff >= 0.125) { - + // TODO: ? } else if (slave.inbreedingCoeff >= 0.0625) { r.push("somewhat"); } else { diff --git a/src/endWeek/saDiet.js b/src/endWeek/saDiet.js index cd181294e04ea7a9b008e17bedc5dd8c7cb8d62d..4446e28c06ea416fe152b08bc7db93af43a04409 100644 --- a/src/endWeek/saDiet.js +++ b/src/endWeek/saDiet.js @@ -591,6 +591,7 @@ App.SlaveAssignment.diet = (function() { target = Math.trunc(Math.clamp(weightShift * 1000 + (buttSize * 1000 - growthGoal) * 4, 0, 72000)); } if (random(1, roll) <= target && buttSize > 0) { + // FIXME: identical branches if (slave.geneMods.NCS === 1 && buttSize > 2) { // TODO: WRITE BRANCH r.push(`<span class="change negative">${His} butt gets a little smaller.</span>`); slave.butt -= 1; diff --git a/src/endWeek/saStayConfined.js b/src/endWeek/saStayConfined.js index eda744d2db9db9247912625bf90bd19cf06011c0..e019cacd79360b45642e4f8308021805615e597e 100644 --- a/src/endWeek/saStayConfined.js +++ b/src/endWeek/saStayConfined.js @@ -1,7 +1,7 @@ /** * @typedef {Object} confinedResults * @property {string} text - * @property {Boolean} broken + * @property {boolean} broken */ /** diff --git a/src/interaction/siFinancial.js b/src/interaction/siFinancial.js index 25968a6cad73bd99c2716833399c04ba173e2bc6..62c75f25c15f3648502a62f8736c49cb2dd22f53 100644 --- a/src/interaction/siFinancial.js +++ b/src/interaction/siFinancial.js @@ -210,7 +210,7 @@ App.UI.SlaveInteract.financial = function(slave) { `Retire ${him}`, () => { V.retiree = slave.ID; - V.retired = 1; + V.retired = 1; // FIXME: Property 'retired' does not exist on type 'GameVariables'. }, [], "SE retirement", diff --git a/src/interaction/siWardrobe.js b/src/interaction/siWardrobe.js index f9f984bee5b3fc05d008e910dcf08c644f297471..ec4100d6ad67a39bf43c266666f08bcf6309dde7 100644 --- a/src/interaction/siWardrobe.js +++ b/src/interaction/siWardrobe.js @@ -186,6 +186,7 @@ App.UI.SlaveInteract.wardrobe = function(slave) { if (key === "choosing her own clothes") { continue; } + // FIXME: Property 'harsh' does not exist on type 'slaveWear | slaveWearChastity'. if (filters.hasOwnProperty("harsh") && ((filters.harsh === false && object.harsh) || (filters.harsh === true && !object.harsh))) { continue; } @@ -786,6 +787,7 @@ App.UI.SlaveInteract.wardrobe = function(slave) { updateSlave: {}, FS: object.fs, }; + // FIXME: Property 'updateSlave' does not exist on type 'slaveWear | slaveWearChastity'. Object.assign(reshapedItem.updateSlave, object.updateSlave); optionsArray.push(reshapedItem); } diff --git a/src/js/ibcJS.js b/src/js/ibcJS.js index ea09c7c542d8648881007e4d03abdc5d425f61fb..c0a19002c7a8a7c73046f90388739301ca05920d 100644 --- a/src/js/ibcJS.js +++ b/src/js/ibcJS.js @@ -9,6 +9,8 @@ * @property {number} [inbreedingCoeff] */ +// TODO: replace snake_case with camelCase + globalThis.ibc = (() => { // These IDs are considered to be unknown parents let or_null = (s) => specificCharacterID(s) ? s : null; diff --git a/src/js/itemAvailability.js b/src/js/itemAvailability.js index 67115860977d7e917be75ed6a895fc493460a6ad..1a70b09f052bc9cbde194c99b878d0eb70d12841 100644 --- a/src/js/itemAvailability.js +++ b/src/js/itemAvailability.js @@ -63,13 +63,13 @@ globalThis.isItemAccessible = (function() { /** * Returns array of wearable clothing in format [name, value], basically player facing / game data. * @param {Map} map Map to look in (such as App.Data.clothes) - * @param {string} [filter] for example, if we want to filer clothing data by the "harsh" property, pass harsh as the parameter here. + * @param {string} [filter] for example, if we want to filter clothing data by the "harsh" property, pass harsh as the parameter here. * @param {any} [filterValue] remove any clothing where the .filter property does not match this value. Function will evaluate undefined as false. * @returns {Array} */ function array(map, filter, filterValue) { const array = []; - for (const [key, obj] of map) { + for (const [key, obj] of map) { // FIXME: 'key' is declared but its value is never read. if (filter && filterValue !== (obj[filter] || false)) { continue; } diff --git a/src/js/pronouns.js b/src/js/pronouns.js index b90c0540243c28783cafda92140ad249d07b95ab..7aff23fdc14e6411866c137c62ca34acd41312e5 100644 --- a/src/js/pronouns.js +++ b/src/js/pronouns.js @@ -61,8 +61,12 @@ App.Utils.Pronouns = class { get sister() { return this.noun === "girl" ? "sister" : "brother"; } get Sister() { return capFirstChar(this.sister); } + // TODO: remove this once overhauled + // eslint-disable-next-line sonarjs/no-all-duplicated-branches get wife() { return this.noun === "girl" ? "wife" : "wife"; } get Wife() { return capFirstChar(this.wife); } + // TODO: remove this once overhauled + // eslint-disable-next-line sonarjs/no-all-duplicated-branches get wives() { return this.noun === "girl" ? "wives" : "wives"; } get Wives() { return capFirstChar(this.wives); } diff --git a/src/js/salon.js b/src/js/salon.js index 74916eb4ff5a80df035fa3a44c6ce96fda0e8b43..a3fa942df208b74281cc2222cfa2eb672fca41bb 100644 --- a/src/js/salon.js +++ b/src/js/salon.js @@ -1,6 +1,6 @@ /** * @param {FC.HumanState} entity - * @param {Boolean} cheat + * @param {boolean} cheat * @returns {HTMLDivElement} */ App.Medicine.Modification.eyeSelector = function(entity, cheat = false) { @@ -229,7 +229,7 @@ App.Medicine.Modification.eyeSelector = function(entity, cheat = false) { * @param {object} params * @param {number|string} [params.primaryEarColor=0] * @param {string} [params.secondaryEarColor=""] - * @param {Boolean} [params.cheat=false] + * @param {boolean} [params.cheat=false] * @returns {HTMLElement} */ App.Medicine.Salon.ears = function(slave, {primaryEarColor = 0, secondaryEarColor = "", cheat = false} = {}) { @@ -334,7 +334,7 @@ App.Medicine.Salon.ears = function(slave, {primaryEarColor = 0, secondaryEarColo * @param {object} params * @param {number|string} [params.primaryTailColor] * @param {string} [params.secondaryTailColor] - * @param {Boolean} [params.cheat] + * @param {boolean} [params.cheat] * @returns {JQuery<HTMLElement>} */ App.Medicine.Salon.tail = function(slave, {primaryTailColor = 0, secondaryTailColor = "", cheat = false} = {}) { diff --git a/src/js/textbox2.js b/src/js/textbox2.js index 9f6330d631498671f21c0888e2690ca695dbcf3c..78688c69f9dac9eabcdabb941c756baacf9140dd 100644 --- a/src/js/textbox2.js +++ b/src/js/textbox2.js @@ -65,7 +65,7 @@ Macro.add("textbox2", { jQuery(inputElement).attr({ id: `${this.name}-${r}`, name: `${this.name}-${r}`, - // type: isNumber ? "number" : "text", /* TODO - hide spinner if we do this */ + // type: isNumber ? "number" : "text", /* TODO: - hide spinner if we do this */ tabindex: 0 }).addClass(`macro-${this.name}`) .on("change", function() { @@ -77,7 +77,8 @@ Macro.add("textbox2", { gotoPassage(); } }) - .on("keypress", function(e) { + .on("keypress", function (e) { + // FIXME: deprecated method e.which === 13 && (e.preventDefault(), State.setVar(t, valueToNumberIfSame(this.value)), gotoPassage()); }).appendTo(this.output), State.setVar(t, a), inputElement.value = a, autofocus && (inputElement.setAttribute("autofocus", "autofocus"), postdisplay[`#autofocus:${inputElement.id}`] = function(e) { delete postdisplay[e], setTimeout(function() {