chore: promote no-case-declarations lint to an error
All checks were successful
Build / build (18) (push) Successful in 1m5s
Build / build (20) (push) Successful in 1m3s
Build / build (22) (push) Successful in 1m3s
Build / build (18) (pull_request) Successful in 1m8s
Build / build (20) (pull_request) Successful in 1m4s
Build / build (22) (pull_request) Successful in 1m11s

This commit is contained in:
Sainan 2025-02-25 03:51:31 +01:00
parent 421164986a
commit abcff085ec
4 changed files with 22 additions and 17 deletions

View File

@ -23,7 +23,7 @@
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-loss-of-precision": "warn",
"@typescript-eslint/no-unnecessary-condition": "warn",
"no-case-declarations": "warn",
"no-case-declarations": "error",
"prettier/prettier": "error",
"@typescript-eslint/semi": "error",
"no-mixed-spaces-and-tabs": "error",

View File

@ -404,6 +404,7 @@ export const addItem = async (
switch (typeName.substr(1).split("/")[2]) {
case "Mods": // Legendary Core
case "CosmeticEnhancers": // Traumatic Peculiar
{
const changes = [
{
ItemType: typeName,
@ -419,6 +420,8 @@ export const addItem = async (
}
break;
}
break;
}
case "Types":
switch (typeName.substr(1).split("/")[2]) {
case "Sentinels": {

View File

@ -208,14 +208,14 @@ export const addMissionInventoryUpdates = (
inventory.CompletedSorties.push(value);
break;
}
case "SeasonChallengeCompletions":
case "SeasonChallengeCompletions": {
const processedCompletions = value.map(({ challenge, id }) => ({
challenge: challenge.substring(challenge.lastIndexOf("/") + 1),
id
}));
inventory.SeasonChallengeHistory.push(...processedCompletions);
break;
}
default:
// Equipment XP updates
if (equipmentKeys.includes(key as TEquipmentKey)) {

View File

@ -105,7 +105,7 @@ export const updateStats = async (playerStats: TStatsDatabaseDocument, payload:
case "FIRE_WEAPON":
case "HIT_ENTITY_ITEM":
case "HEADSHOT_ITEM":
case "KILL_ENEMY_ITEM":
case "KILL_ENEMY_ITEM": {
playerStats.Weapons ??= [];
const statKey = {
FIRE_WEAPON: "fired",
@ -126,10 +126,11 @@ export const updateStats = async (playerStats: TStatsDatabaseDocument, payload:
}
}
break;
}
case "KILL_ENEMY":
case "EXECUTE_ENEMY":
case "HEADSHOT":
case "HEADSHOT": {
playerStats.Enemies ??= [];
const enemyStatKey = {
KILL_ENEMY: "kills",
@ -149,6 +150,7 @@ export const updateStats = async (playerStats: TStatsDatabaseDocument, payload:
}
}
break;
}
case "DIE":
playerStats.Enemies ??= [];