Enable ESLint rule no-case-declarations (#2113)

## Description:

This PR enables the ESLint rule `no-case-declarations`.
Fixes #1791 

The issue was already assigned, but since there hasn’t been any activity
for about a month, I decided to open this PR.

## 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:

aotumuri
This commit is contained in:
Aotumuri
2025-09-30 11:11:44 -07:00
committed by GitHub
parent 9e9d689175
commit d48801d3d7
4 changed files with 7 additions and 6 deletions
+2 -2
View File
@@ -312,7 +312,7 @@ export class UILayer implements Layer {
return 1;
}
switch (unit.type()) {
case UnitType.Construction:
case UnitType.Construction: {
const constructionType = unit.constructionType();
if (constructionType === undefined) {
return 1;
@@ -326,7 +326,7 @@ export class UILayer implements Layer {
(this.game.ticks() - unit.createdAt()) /
(constDuration === 0 ? 1 : constDuration)
);
}
case UnitType.MissileSilo:
case UnitType.SAMLauncher:
return unit.missileReadinesss();