Add + apply rule disallowing the use of the integer type alias

This commit is contained in:
NightKev 2025-04-26 20:49:45 -07:00
parent df51acef49
commit 6467442cbd
2 changed files with 14 additions and 1 deletions

View File

@ -91,6 +91,19 @@
"noUselessSwitchCase": "off", // Explicit > Implicit
"noUselessConstructor": "warn", // TODO: Refactor and make this an error
"noBannedTypes": "warn" // TODO: Refactor and make this an error
},
"nursery": {
"noRestrictedTypes": {
"level": "error",
"options": {
"types": {
"integer": {
"message": "This is an alias for 'number' that can provide false impressions of what values can actually be contained in this variable. Use 'number' instead.",
"use": "number"
}
}
}
}
}
}
},

View File

@ -24,7 +24,7 @@ export class RevivalBlessingPhase extends BattlePhase {
UiMode.PARTY,
PartyUiMode.REVIVAL_BLESSING,
this.user.getFieldIndex(),
(slotIndex: integer, _option: PartyOption) => {
(slotIndex: number, _option: PartyOption) => {
if (slotIndex >= 0 && slotIndex < 6) {
const pokemon = globalScene.getPlayerParty()[slotIndex];
if (!pokemon || !pokemon.isFainted()) {