mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-08-06 10:54:21 +00:00
Enabled the @typescript-eslint/no-unused-expressions eslint rule (#2014)
## Description: - Fixes #1790 - Fixed the codebase: - expressions short-circuiting with `&&` changed to proper `if` statements - `A instanceof B;` expressions now emit warnings ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I process any text displayed to the user through translateText() and I've added it to the en.json file - [x] I have added relevant tests to the test directory - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced ## Please put your Discord username so you can be contacted if a bug or regression is found: michal7952 --------- Co-authored-by: Evan <evanpelle@gmail.com>
This commit is contained in:
@@ -1051,7 +1051,7 @@ export class EventsDisplay extends LitElement implements Layer {
|
||||
? this.renderButton({
|
||||
content: this.getEventDescription(event),
|
||||
onClick: () => {
|
||||
event.focusID &&
|
||||
if (event.focusID)
|
||||
this.emitGoToPlayerEvent(event.focusID);
|
||||
},
|
||||
className: "text-left",
|
||||
@@ -1060,7 +1060,7 @@ export class EventsDisplay extends LitElement implements Layer {
|
||||
? this.renderButton({
|
||||
content: this.getEventDescription(event),
|
||||
onClick: () => {
|
||||
event.unitView &&
|
||||
if (event.unitView)
|
||||
this.emitGoToUnitEvent(
|
||||
event.unitView,
|
||||
);
|
||||
|
||||
@@ -255,7 +255,9 @@ export class StructureIconsLayer implements Layer {
|
||||
this.potentialUpgrade.iconContainer.filters = [];
|
||||
this.potentialUpgrade.dotContainer.filters = [];
|
||||
}
|
||||
this.ghostUnit?.container && (this.ghostUnit.container.filters = []);
|
||||
if (this.ghostUnit?.container) {
|
||||
this.ghostUnit.container.filters = [];
|
||||
}
|
||||
|
||||
if (!this.ghostUnit) return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user