Remove the fucking linter warnings
This commit is contained in:
@@ -2,6 +2,7 @@ local addonname, shared = ...
|
||||
---@cast shared HeimdallShared
|
||||
---@cast addonname string
|
||||
|
||||
---@diagnostic disable-next-line: missing-fields
|
||||
shared.DeathReporter = {}
|
||||
function shared.DeathReporter.Init()
|
||||
-- if not Heimdall_Data.config.deathReporter.enabled then
|
||||
|
@@ -1,11 +1,11 @@
|
||||
local addonname, data = ...
|
||||
---@cast data HeimdallData
|
||||
local addonname, shared = ...
|
||||
---@cast shared HeimdallShared
|
||||
---@cast addonname string
|
||||
|
||||
if not data.dumpTable then
|
||||
if not shared.dumpTable then
|
||||
---@param table table
|
||||
---@param depth number?
|
||||
data.dumpTable = function(table, depth)
|
||||
shared.dumpTable = function(table, depth)
|
||||
if not table then
|
||||
print(tostring(table))
|
||||
return
|
||||
@@ -20,7 +20,7 @@ if not data.dumpTable then
|
||||
for k, v in pairs(table) do
|
||||
if (type(v) == "table") then
|
||||
print(string.rep(" ", depth) .. k .. ":")
|
||||
data.dumpTable(v, depth + 1)
|
||||
shared.dumpTable(v, depth + 1)
|
||||
else
|
||||
print(string.rep(" ", depth) .. k .. ": ", v)
|
||||
end
|
||||
|
12
Heimdall.lua
12
Heimdall.lua
@@ -12,6 +12,8 @@ local function init()
|
||||
---@field config HeimdallConfig
|
||||
---@field stinkies table<string, boolean>
|
||||
if not Heimdall_Data then Heimdall_Data = {} end
|
||||
---@class InitTable
|
||||
---@field Init fun(): nil
|
||||
|
||||
---@class HeimdallShared
|
||||
---@field raceMap table<string, string>
|
||||
@@ -22,11 +24,11 @@ local function init()
|
||||
---@field utf8len fun(input: string): number
|
||||
---@field padString fun(input: string, targetLength: number, left?: boolean): string
|
||||
---@field GetOrDefault fun(table: table<any, any>, keys: string[], default: any): any
|
||||
---@field Whoer { Init: fun() }
|
||||
---@field Messenger { Init: fun() }
|
||||
---@field Spotter { Init: fun() }
|
||||
---@field DeathReporter { Init: fun() }
|
||||
---@field Inviter { Init: fun() }
|
||||
---@field Whoer InitTable
|
||||
---@field Messenger InitTable
|
||||
---@field Spotter InitTable
|
||||
---@field DeathReporter InitTable
|
||||
---@field Inviter InitTable
|
||||
|
||||
--- Config ---
|
||||
---@class HeimdallConfig
|
||||
|
@@ -2,6 +2,7 @@ local addonname, shared = ...
|
||||
---@cast shared HeimdallShared
|
||||
---@cast addonname string
|
||||
|
||||
---@diagnostic disable-next-line: missing-fields
|
||||
shared.Inviter = {}
|
||||
function shared.Inviter.Init()
|
||||
-- if not Heimdall_Data.config.inviter.enabled then
|
||||
|
@@ -2,6 +2,7 @@ local addonname, shared = ...
|
||||
---@cast shared HeimdallShared
|
||||
---@cast addonname string
|
||||
|
||||
---@diagnostic disable-next-line: missing-fields
|
||||
shared.Messenger = {}
|
||||
function shared.Messenger.Init()
|
||||
-- if not Heimdall_Data.config.messenger.enabled then
|
||||
|
@@ -2,6 +2,7 @@ local addonname, shared = ...
|
||||
---@cast shared HeimdallShared
|
||||
---@cast addonname string
|
||||
|
||||
---@diagnostic disable-next-line: missing-fields
|
||||
shared.Spotter = {}
|
||||
function shared.Spotter.Init()
|
||||
-- if not Heimdall_Data.config.spotter.enabled then
|
||||
|
Reference in New Issue
Block a user