mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2026-08-13 00:45:11 +09:00
Fix duplicate class and annotation placement lint errors
Classes contributed to by more than one file now carry the `partial` attribute. trains.lua declared its command as `ExpCommand_Artillery`, which was a copy paste. `Color.0` and `MapPosition.0` became `.struct` in fmtk 2.1.6. emmylua rejects `@type` on a function statement or a `do` block, so those are moved onto the local or replaced by `@param` and `@return`. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -10,7 +10,7 @@ The default permission authorities controlled by the flags: admin_only, system_o
|
||||
|
||||
local Storage = require("modules/exp_util/storage")
|
||||
|
||||
local Commands = require("modules/exp_commands") --- @class Commands
|
||||
local Commands = require("modules/exp_commands") --- @class (partial) Commands
|
||||
local add, allow, deny = Commands.add_permission_authority, Commands.status.success, Commands.status.unauthorised
|
||||
|
||||
local authorities = {}
|
||||
|
||||
@@ -12,7 +12,7 @@ local ExpUtil = require("modules/exp_util")
|
||||
local Async = require("modules/exp_util/async")
|
||||
local Storage = require("modules/exp_util/storage")
|
||||
|
||||
local Commands = require("modules/exp_commands") --- @class Commands
|
||||
local Commands = require("modules/exp_commands") --- @class (partial) Commands
|
||||
|
||||
local rcon_env = {} --- @type table<string, any>
|
||||
local rcon_static = {} --- @type table<string, any>
|
||||
|
||||
@@ -25,7 +25,7 @@ local Commands = require("modules/exp_commands")
|
||||
local add, parse = Commands.add_data_type, Commands.parse_input
|
||||
local valid, invalid = Commands.status.success, Commands.status.invalid_input
|
||||
|
||||
local types = {} --- @class Commands.types
|
||||
local types = {} --- @class (partial) Commands.types
|
||||
|
||||
--- A boolean value where true is one of: yes, y, true, 1
|
||||
types.boolean =
|
||||
|
||||
@@ -61,7 +61,7 @@ local Search = require("modules/exp_commands/search")
|
||||
--- @type LuaPlayer?
|
||||
local _print_player
|
||||
|
||||
--- @class Commands
|
||||
--- @class (partial) Commands
|
||||
local Commands = {
|
||||
color = ExpUtil.color,
|
||||
format_rich_text_color = ExpUtil.format_rich_text_color,
|
||||
@@ -84,7 +84,7 @@ local Commands = {
|
||||
--- Contains the different status values a command can return
|
||||
Commands.status = {}
|
||||
|
||||
--- @class Commands.types: table<string, Commands.InputParser | Commands.InputParserFactory>
|
||||
--- @class (partial) Commands.types: table<string, Commands.InputParser | Commands.InputParserFactory>
|
||||
--- Stores all input parsers and validators for different data types
|
||||
Commands.types = {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user