Remove all diagnostic suppressions
This commit is contained in:
parent
e0e1e4c889
commit
5a1ca3c73e
7 changed files with 10 additions and 27 deletions
8
.vscode/settings.json
vendored
8
.vscode/settings.json
vendored
|
|
@ -1,4 +1,8 @@
|
|||
{
|
||||
"Lua.diagnostics.disable": [
|
||||
"duplicate-set-field",
|
||||
"lowercase-global",
|
||||
],
|
||||
"Lua.diagnostics.severity": {
|
||||
"ambiguity-1": "Error",
|
||||
"assign-type-mismatch": "Error",
|
||||
|
|
@ -18,14 +22,12 @@
|
|||
"duplicate-doc-field": "Error",
|
||||
"duplicate-doc-param": "Error",
|
||||
"duplicate-index": "Error",
|
||||
"duplicate-set-field": "Error",
|
||||
"empty-block": "Error",
|
||||
"global-element": "Error",
|
||||
"global-in-nil-env": "Error",
|
||||
"incomplete-signature-doc": "Error",
|
||||
"inject-field": "Error",
|
||||
"invisible": "Error",
|
||||
"lowercase-global": "Error",
|
||||
"missing-fields": "Error",
|
||||
"missing-global-doc": "Error",
|
||||
"missing-local-export-doc": "Error",
|
||||
|
|
@ -62,5 +64,5 @@
|
|||
"unused-label": "Error",
|
||||
"unused-local": "Error",
|
||||
"unused-vararg": "Error",
|
||||
}
|
||||
},
|
||||
}
|
||||
|
|
@ -15,13 +15,11 @@ local back = (function()
|
|||
local calculate = tbl.calculate
|
||||
|
||||
function tbl:apply(...)
|
||||
---@diagnostic disable-next-line: redundant-return-value
|
||||
return apply and G.GAME.selected_sleeve ~= "sleeve_Roland_" .. key and save(apply(self, ...))
|
||||
local _ = apply and G.GAME.selected_sleeve ~= "sleeve_Roland_" .. key and save(apply(self, ...))
|
||||
end
|
||||
|
||||
function tbl:calculate(...)
|
||||
---@diagnostic disable-next-line: return-type-mismatch
|
||||
return calculate and G.GAME.selected_sleeve ~= "sleeve_Roland_" .. key and calculate(self, ...)
|
||||
return (calculate and G.GAME.selected_sleeve ~= "sleeve_Roland_" .. key) and calculate(self, ...) or nil
|
||||
end
|
||||
|
||||
tbl.pos = {x = x, y = 0}
|
||||
|
|
@ -164,7 +162,6 @@ back {
|
|||
local swapper = {Spectral = "Tarot", Tarot = "Spectral"}
|
||||
local orig_create_card = create_card
|
||||
|
||||
---@diagnostic disable-next-line: lowercase-global
|
||||
function create_card(_type, ...)
|
||||
if not G.GAME.modifiers.Roland_swapper_deck then
|
||||
return orig_create_card(_type, ...)
|
||||
|
|
|
|||
|
|
@ -109,7 +109,6 @@ charm {
|
|||
|
||||
local orig_showman = SMODS.showman
|
||||
|
||||
---@diagnostic disable-next-line: duplicate-set-field
|
||||
function SMODS.showman(...)
|
||||
return G.GAME.Bakery_charm == "BakeryCharm_Roland_flexible" or orig_showman(...)
|
||||
end
|
||||
|
|
@ -131,7 +130,6 @@ charm {
|
|||
|
||||
local orig_init = Card.init
|
||||
|
||||
---@diagnostic disable-next-line: duplicate-set-field
|
||||
function Card:init(X, Y, W, H, card, center, params, ...)
|
||||
if G.GAME.Bakery_charm ~= "BakeryCharm_Roland_fat" or center.set ~= "Booster" then
|
||||
return orig_init(self, X, Y, W, H, card, center, params, ...)
|
||||
|
|
@ -172,7 +170,6 @@ charm {
|
|||
|
||||
local orig_set_ability = Card.set_ability
|
||||
|
||||
---@diagnostic disable-next-line: duplicate-set-field
|
||||
function Card:set_ability(center, initial, delay_sprites, ...)
|
||||
local ret = orig_set_ability(self, center, initial, delay_sprites, ...)
|
||||
|
||||
|
|
|
|||
|
|
@ -453,15 +453,12 @@ joker {
|
|||
SMODS.calculate_context {drawing_cards = true, draw = {G.deck.cards}}
|
||||
|
||||
SMODS.calculate_context {
|
||||
---@diagnostic disable-next-line: assign-type-mismatch
|
||||
first_hand_drawn = not current_round.any_hand_drawn and facing_blind,
|
||||
---@diagnostic disable-next-line: assign-type-mismatch
|
||||
hand_drawn = facing_blind and {G.deck.cards[1]},
|
||||
first_hand_drawn = not current_round.any_hand_drawn and facing_blind or nil,
|
||||
hand_drawn = facing_blind and {G.deck.cards[1]} --[[@as true]],
|
||||
other_drawn = not facing_blind and {G.deck.cards[1]},
|
||||
}
|
||||
|
||||
if type(facing_blind) == "table" then
|
||||
---@diagnostic disable-next-line: inject-field
|
||||
facing_blind.any_hand_drawn = facing_blind.any_hand_drawn or facing_blind
|
||||
end
|
||||
end,
|
||||
|
|
|
|||
|
|
@ -160,9 +160,7 @@ function f:concat(...)
|
|||
local fs = {...}
|
||||
|
||||
for i = 1, #fs do
|
||||
if not is_f(fs[i]) then ---@diagnostic disable-next-line: assign-type-mismatch
|
||||
fs[i] = f.from(fs[i])
|
||||
end
|
||||
fs[i] = is_f(fs[i]) and fs[i] or f.from(fs[i])
|
||||
end
|
||||
|
||||
return f.new(function()
|
||||
|
|
|
|||
|
|
@ -44,7 +44,6 @@ SMODS.Atlas {
|
|||
path = "icon.png",
|
||||
}
|
||||
|
||||
---@diagnostic disable-next-line: duplicate-set-field
|
||||
function SMODS.current_mod.config_tab()
|
||||
return {
|
||||
n = G.UIT.ROOT,
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ local orig_set_debuff = Card.set_debuff
|
|||
local orig_highlight = Card.highlight
|
||||
local orig_copy_card = copy_card
|
||||
|
||||
---@diagnostic disable-next-line: duplicate-set-field
|
||||
function CardArea:can_highlight(...)
|
||||
if self ~= G.consumeables or not SMODS.Mods.Roland.config.no_highlight_limit then
|
||||
return orig_can_highlight(self, ...)
|
||||
|
|
@ -17,7 +16,6 @@ function CardArea:can_highlight(...)
|
|||
return true
|
||||
end
|
||||
|
||||
---@diagnostic disable-next-line: duplicate-set-field
|
||||
function Card:set_debuff(...)
|
||||
if self.config and
|
||||
self.config.center_key == "m_wild" and
|
||||
|
|
@ -28,7 +26,6 @@ function Card:set_debuff(...)
|
|||
end
|
||||
end
|
||||
|
||||
---@diagnostic disable-next-line: duplicate-set-field
|
||||
function Card:highlight(is_highlighted, ...)
|
||||
self.highlighted = is_highlighted
|
||||
|
||||
|
|
@ -39,7 +36,6 @@ end
|
|||
|
||||
local orig_use_consumeable = Card.use_consumeable
|
||||
|
||||
---@diagnostic disable-next-line: duplicate-set-field
|
||||
function Card:use_consumeable(area, copier, ...)
|
||||
local seal_spectrals = {["Deja Vu"] = true, Medium = true, Talisman = true, Trance = true}
|
||||
|
||||
|
|
@ -72,7 +68,6 @@ function Card:use_consumeable(area, copier, ...)
|
|||
}
|
||||
end
|
||||
|
||||
---@diagnostic disable-next-line: lowercase-global
|
||||
function copy_card(other, new_card, ...)
|
||||
local ret = orig_copy_card(other, new_card, ...)
|
||||
|
||||
|
|
@ -89,7 +84,6 @@ end
|
|||
q(function()
|
||||
local orig_can_highlight_area = Bakery_API.can_highlight_area
|
||||
|
||||
---@diagnostic disable-next-line: duplicate-set-field
|
||||
function Bakery_API.can_highlight_area(area, ...)
|
||||
return (area == G.consumeables and
|
||||
SMODS.Mods.Roland.config.no_highlight_limit) or
|
||||
|
|
@ -99,7 +93,6 @@ end)
|
|||
|
||||
local orig_create_card_for_shop = create_card_for_shop
|
||||
|
||||
---@diagnostic disable-next-line: lowercase-global
|
||||
function create_card_for_shop(...)
|
||||
---@type Card
|
||||
local ret = orig_create_card_for_shop(...)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue