Conversation
|
My two cents:
Overall, we have to ask ourselves "WHY is the linter unhappy" and not just attempt to appease it at any cost. |
|
Took a bit to reverse-engineer what linter this is defending against — it's LuaLS (Lua Language Server). The The X = X or nil pattern is a no-op that just tells LuaLS "yes, this global exists." The proper fix is a .luarc.json at the project root with a diagnostics.globals list for cross-mod symbols (Distro, Handy, TMJ, Galdur, Talisman, Wheel, etc.). That would eliminate most of these changes outright. Agreeing with Brawmario's points — the silent nil guards (if not X then return end) are a separate concern from linter happiness and can mask real bugs downstream. Happy to get a .luarc.json set up. Ping me on Discord (stephylicious) if you want to go over directions for that or anything else here. |
Make the linter happy :)