diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7075cd34..834d0e3e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -103,14 +103,11 @@ jobs: # Test validity - name: typecheck src files - run: luau-lsp analyze src --sourcemap=sourcemap.json --ignore="Packages/**" --ignore="**/Packages/**" --ignore="*.spec.luau" --ignore="out/**" --flag:LuauTypeInferIterationLimit=0 --flag:LuauCheckRecursionLimit=0 --flag:LuauTypeInferRecursionLimit=0 --flag:LuauTarjanChildLimit=0 --flag:LuauTypeInferTypePackLoopLimit=0 --flag:LuauVisitRecursionLimit=0 --definitions=types/globalTypes.d.lua --flag:LuauParseDeclareClassIndexer=true + run: luau-lsp analyze src --sourcemap=sourcemap.json --ignore="Packages/**" --ignore="**/Packages/**" --ignore="*.spec.luau" --flag:LuauTypeInferIterationLimit=0 --flag:LuauCheckRecursionLimit=0 --flag:LuauTypeInferRecursionLimit=0 --flag:LuauTarjanChildLimit=0 --flag:LuauTypeInferTypePackLoopLimit=0 --flag:LuauVisitRecursionLimit=0 --definitions=types/globalTypes.d.lua --flag:LuauParseDeclareClassIndexer=true - name: lint src files run: selene src - - name: lint built files - run: selene out - - name: Update version and labels shell: bash run: | diff --git a/scripts/test/selene.sh b/scripts/test/selene.sh index a0f03408..fad09252 100644 --- a/scripts/test/selene.sh +++ b/scripts/test/selene.sh @@ -2,5 +2,5 @@ content_dir_path=$1 selene $content_dir_path > tests/selene/$content_dir_path.txt error_count=$(grep -o -w "error" "tests/selene/${content_dir_path}.txt" | wc -l) -warn_count=$(grep -o -w "warn" "tests/selene/${content_dir_path}.txt" | wc -l) +warn_count=$(grep -o -w "warning" "tests/selene/${content_dir_path}.txt" | wc -l) echo "${content_dir_path} selene errors: ${error_count}, warnings: ${warn_count}" \ No newline at end of file diff --git a/src/Button/init.lua b/src/Button/init.lua index 5a9eacb5..1cbb4932 100644 --- a/src/Button/init.lua +++ b/src/Button/init.lua @@ -187,7 +187,7 @@ function Constructor(config: ButtonParameters): Button end)) -- construct sub-instances - local TextLabel = TextLabel(maid)({ + local ButtonTextLabel = TextLabel(maid)({ BackgroundTransparency = 1, TextTransparency = TextTransparency, ZIndex = 2, @@ -213,7 +213,7 @@ function Constructor(config: ButtonParameters): Button Position = UDim2.fromScale(0.5, 0.5), }) maid:GiveTask(RunService.RenderStepped:Connect(function(deltaTime: number) - LabelAbsoluteSize:Set(TextLabel.AbsoluteSize) + LabelAbsoluteSize:Set(ButtonTextLabel.AbsoluteSize) end)) local TextButton: TextButton = _fuse.new("TextButton")({ @@ -393,7 +393,7 @@ function Constructor(config: ButtonParameters): Button end, IsHovering, IsSelected, IsRippling, ActiveBackgroundColor, ActiveFillColor, TimeKeys), }), TextButton, - TextLabel, + ButtonTextLabel, } :: { Instance }, } config.BorderTransparency = nil diff --git a/src/Util.lua b/src/Util.lua index 0e2fbbe6..5086d0af 100644 --- a/src/Util.lua +++ b/src/Util.lua @@ -13,44 +13,44 @@ type Signal = Signal.Signal local Util = {} Util.__index = Util -function Util.cleanUpPrep(Maid: Maid, inst: Instance) +function Util.cleanUpPrep(maid: Maid, inst: Instance) local compMaid = Maid.new() compMaid:GiveTask(inst) for i, desc in ipairs(inst:GetDescendants()) do compMaid:GiveTask(desc) end - Maid:GiveTask(compMaid) + maid:GiveTask(compMaid) - Maid:GiveTask(inst.Destroying:Connect(function() + maid:GiveTask(inst.Destroying:Connect(function() compMaid:Destroy() - Maid:Destroy() + maid:Destroy() end)) end -function Util.bindFunction(inst: Instance, Maid: Maid, name: string, func: F): BindableFunction & { OnInvoke: F } +function Util.bindFunction(inst: Instance, maid: Maid, name: string, func: F): BindableFunction & { OnInvoke: F } assert(typeof(func) == "function") local bindableFunction = Instance.new("BindableFunction") bindableFunction.Name = name bindableFunction.OnInvoke = func - Maid:GiveTask(bindableFunction) + maid:GiveTask(bindableFunction) bindableFunction.Parent = inst local bFunc: any = bindableFunction return bFunc end -function Util.bindSignal(inst: Instance, Maid: Maid, name: string, Signal: Signal): BindableEvent +function Util.bindSignal(inst: Instance, maid: Maid, name: string, signal: Signal): BindableEvent local bindableEvent = Instance.new("BindableEvent") bindableEvent.Name = name -- Maid:GiveTask(bindableEvent.Event:Connect(function(...) - -- Signal:Fire(...) + -- signal:Fire(...) -- end)) - Maid:GiveTask(Signal:Connect(function(...) + maid:GiveTask(Signal:Connect(function(...) bindableEvent:Fire(...) end)) - Maid:GiveTask(bindableEvent) + maid:GiveTask(bindableEvent) bindableEvent.Parent = inst return bindableEvent diff --git a/src/init.lua b/src/init.lua index 0edd3942..3ffab25c 100644 --- a/src/init.lua +++ b/src/init.lua @@ -77,7 +77,7 @@ export type Synthetic = ( & ((className: "BillboardFrame") -> (BillboardFrameParameters) -> BillboardFrame.BillboardFrame) ) -return function(Maid: Maid?): Synthetic +return function(maid: Maid?): Synthetic return function(className: any): any assert( className == "TextLabel" @@ -99,37 +99,37 @@ return function(Maid: Maid?): Synthetic or className == "BillboardFrame" ) if className == "TextLabel" then - return TextLabel(Maid) + return TextLabel(maid) elseif className == "ViewportMountFrame" then - return ViewportMountFrame(Maid) + return ViewportMountFrame(maid) elseif className == "TextField" then - return TextField(Maid) + return TextField(maid) elseif className == "Switch" then - return Switch(Maid) + return Switch(maid) elseif className == "SurfaceFrame" then - return SurfaceFrame(Maid) + return SurfaceFrame(maid) elseif className == "Slider" then - return Slider(Maid) + return Slider(maid) elseif className == "RadioButton" then - return RadioButton(Maid) + return RadioButton(maid) elseif className == "IconLabel" then - return IconLabel(Maid) + return IconLabel(maid) elseif className == "Hint" then - return Hint(Maid) + return Hint(maid) elseif className == "EffectGui" then - return EffectGui(Maid) + return EffectGui(maid) elseif className == "Checkbox" then - return Checkbox(Maid) + return Checkbox(maid) elseif className == "Button" then - return Button(Maid) + return Button(maid) elseif className == "Bubble" then - return Bubble(Maid) + return Bubble(maid) elseif className == "BoundingBoxFrame" then - return BoundingBoxFrame(Maid) + return BoundingBoxFrame(maid) elseif className == "BoardFrame" then - return BoardFrame(Maid) + return BoardFrame(maid) elseif className == "BillboardFrame" then - return BillboardFrame(Maid) + return BillboardFrame(maid) end return nil end