From 90699739b9222e4a3d6665d66364f850deaec4ad Mon Sep 17 00:00:00 2001
From: DCoded <dsoloha@live.com>
Date: Sun, 12 May 2019 23:45:55 -0400
Subject: [PATCH] Minor ESlinting

---
 src/004-base/facility.js           | 4 +++-
 src/art/vector/VectorArtJS.js      | 2 +-
 src/debugging/debugJS.js           | 9 +++++----
 src/endWeek/saChoosesOwnClothes.js | 5 ++---
 src/interaction/main/mainLinks.js  | 3 +--
 src/js/DefaultRules.js             | 4 ++--
 src/js/accordianJS.js              | 8 ++++----
 7 files changed, 18 insertions(+), 17 deletions(-)

diff --git a/src/004-base/facility.js b/src/004-base/facility.js
index daad5234e29..f65205771c5 100644
--- a/src/004-base/facility.js
+++ b/src/004-base/facility.js
@@ -340,7 +340,9 @@ App.Entity.Facilities.Facility = class {
 	 */
 	isHosted(slave) {
 		for (const j in this._jobs) {
-			if (this._jobs[j].isEmployed(slave)) return true;
+			if (this._jobs[j].isEmployed(slave)) {
+				return true;
+			}
 		}
 
 		return false;
diff --git a/src/art/vector/VectorArtJS.js b/src/art/vector/VectorArtJS.js
index accfb9ada6e..90813924360 100644
--- a/src/art/vector/VectorArtJS.js
+++ b/src/art/vector/VectorArtJS.js
@@ -303,8 +303,8 @@ window.VectorArt = (function() {
 				case "a penitent nuns habit":
 					if ((canAchieveErection(slave)) && (slave.chastityPenis !== 1)) {
 						penisArtString = jsInclude(`Art_Vector_Bulge_Outfit_Hard_${penisSize}`);
-						break; /* IN CASE OF NO ERECTION, SKIP TO A NORMAL BULGE */	// FIXME: having a break in an if is bad code
 					}
+					// break; /* IN CASE OF NO ERECTION, SKIP TO A NORMAL BULGE */
 				/* BULGE OUTFITS LONG OUTFITS */
 				// eslint-disable-next-line no-fallthrough
 				case "a cheerleader outfit":
diff --git a/src/debugging/debugJS.js b/src/debugging/debugJS.js
index dd29a88a2e7..9c519d0edc6 100644
--- a/src/debugging/debugJS.js
+++ b/src/debugging/debugJS.js
@@ -55,19 +55,20 @@ window.diffFlatten = function diffFlatten(data) {
 			result[prop] = cur;
 		} else if (Array.isArray(cur)) {
 			// eslint-disable-next-line no-var
-			for (var i=0, l=cur.length; i<l; i++) // don't change the "var" to "let"
+			for (var i=0, l=cur.length; i<l; i++) { // don't change the "var" to "let"
 				recurse(cur[i], prop + "[" + i + "]");
+		}
 			// eslint-disable-next-line block-scoped-var
-			if (l === 0)
+			if (l === 0) {
 				result[prop] = [];
+			}
 		} else {
 			let isEmpty = true;
 			for (let p in cur) {
 				isEmpty = false;
 				recurse(cur[p], prop ? prop+"."+p : p);
 			}
-			if (isEmpty && prop)
-				result[prop] = {};
+			if (isEmpty && prop) { result[prop] = {}; }
 		}
 	}
 	recurse(data, "");
diff --git a/src/endWeek/saChoosesOwnClothes.js b/src/endWeek/saChoosesOwnClothes.js
index 1b3792e2cc2..3e63065be50 100644
--- a/src/endWeek/saChoosesOwnClothes.js
+++ b/src/endWeek/saChoosesOwnClothes.js
@@ -23,7 +23,7 @@ window.saChoosesOwnClothes = (function() {
 		V = State.variables;
 		player = V.PC;
 		r = "";
-		if (slave.choosesOwnClothes !== 1) return r;
+		if (slave.choosesOwnClothes !== 1) { return r; }
 		pronouns = getPronouns(slave);
 		he = pronouns.pronoun;
 		him = pronouns.object;
@@ -219,9 +219,8 @@ window.saChoosesOwnClothes = (function() {
 		} else {
 			if (V.arcologies[0].FSChattelReligionist > 0) {
 				clothing.push({text: `and wears a chattel habit to conform to your arcology's culture.`, clothes: "a chattel habit"});
-			}
 			/* Chooses clothes according to assignment (no exceptions)*/
-			else if (slave.assignment === "be the Nurse") {
+			} else if (slave.assignment === "be the Nurse") {
 				if (slave.energy > 95 || slave.need > 100) {
 					wardrobeAssignment.push({text: `and wears a slutty nurse outfit to make it clear just how much this nurse needs ${his} daily lay.`, clothes: "a slutty nurse outfit"});
 				} else if (slave.energy > 80) {
diff --git a/src/interaction/main/mainLinks.js b/src/interaction/main/mainLinks.js
index 32554adc379..1cfae417864 100644
--- a/src/interaction/main/mainLinks.js
+++ b/src/interaction/main/mainLinks.js
@@ -125,8 +125,7 @@ App.UI.View.MainLinks = function() {
 		for (let i = 0; i < V.slaves.length; i++) {
 			let slaveOrgans = 0;
 			V.completedOrgans.forEach(organ => {
-				if (organ.ID === V.slaves[i].ID)
-					slaveOrgans++;
+				if (organ.ID === V.slaves[i].ID) { slaveOrgans++; }
 			});
 			/* if the interrogated slave has one or more organs ready: */
 			if (slaveOrgans > 0) {
diff --git a/src/js/DefaultRules.js b/src/js/DefaultRules.js
index 364f14241e4..90ed3d4ce5e 100644
--- a/src/js/DefaultRules.js
+++ b/src/js/DefaultRules.js
@@ -14,7 +14,7 @@ window.DefaultRules = (function() {
 	 * @returns {object}
 	 */
 	function DefaultRules(slave) {
-		if (slave.useRulesAssistant === 0) return r; // exempted
+		if (slave.useRulesAssistant === 0) { return r; } // exempted
 
 		V = State.variables;
 		r = "";
@@ -23,7 +23,7 @@ window.DefaultRules = (function() {
 		him = pronouns.object;
 		his = pronouns.possessive;
 		let rule = MergeRules(slave);
-		if (Object.keys(rule).length === 0) return r; // no rules apply
+		if (Object.keys(rule).length === 0) { return r; } // no rules apply
 
 		AssignJobToSlave(slave, rule);
 		if (slave.fuckdoll === 0) {
diff --git a/src/js/accordianJS.js b/src/js/accordianJS.js
index 34158aa86d1..f65b7d736a4 100644
--- a/src/js/accordianJS.js
+++ b/src/js/accordianJS.js
@@ -13,7 +13,7 @@
  * 000-250-006 03092017
  */
 
-postdisplay["doAccordionSet"] = function() {
+postdisplay.doAccordionSet = function() {
 	if (variables().useAccordion === 1) {
 		Array.prototype.slice.call(document.querySelectorAll(".macro-include"))
 			.forEach(function(element) {
@@ -22,7 +22,7 @@ postdisplay["doAccordionSet"] = function() {
 	}
 };
 
-postdisplay["doAccordion"] = function() {
+postdisplay.doAccordion = function() {
 	const acc = document.getElementsByClassName("accordion");
 
 	for (let i = 0; i < acc.length; i += 1) {
@@ -30,7 +30,7 @@ postdisplay["doAccordion"] = function() {
 			this.classList.toggle("active");
 			let panel = this.nextElementSibling;
 			if (panel === null || panel === undefined) {
-				panel = document.getElementById(`${this.id }accHidden`);
+				panel = document.getElementById(`${this.id}accHidden`);
 				if (panel.style.display === "none") {
 					panel.style.display = "";
 				} else {
@@ -40,7 +40,7 @@ postdisplay["doAccordion"] = function() {
 				if (panel.style.maxHeight) {
 					panel.style.maxHeight = null;
 				} else {
-					panel.style.maxHeight = `${2 * panel.scrollHeight }px`;
+					panel.style.maxHeight = `${2 * panel.scrollHeight}px`;
 				}
 			}
 		};
-- 
GitLab