fix eslint, lint compliance
This commit is contained in:
parent
b84a3b22dc
commit
e7acbd72fa
5 changed files with 7 additions and 15 deletions
|
@ -26,7 +26,6 @@
|
||||||
"@typescript-eslint/no-array-constructor": "error",
|
"@typescript-eslint/no-array-constructor": "error",
|
||||||
"@typescript-eslint/no-empty-function": "error",
|
"@typescript-eslint/no-empty-function": "error",
|
||||||
"@typescript-eslint/no-empty-interface": "error",
|
"@typescript-eslint/no-empty-interface": "error",
|
||||||
"@typescript-eslint/no-empty-pattern": "none",
|
|
||||||
"@typescript-eslint/no-namespace": "error",
|
"@typescript-eslint/no-namespace": "error",
|
||||||
"@typescript-eslint/no-non-null-assertion": "warn",
|
"@typescript-eslint/no-non-null-assertion": "warn",
|
||||||
"@typescript-eslint/no-unused-vars": [
|
"@typescript-eslint/no-unused-vars": [
|
||||||
|
|
|
@ -10,8 +10,7 @@ interface PaddingProps extends Roact.JsxInstanceProperties<UIPadding> {
|
||||||
Change?: Roact.JsxInstanceChangeEvents<UIPadding>
|
Change?: Roact.JsxInstanceChangeEvents<UIPadding>
|
||||||
}
|
}
|
||||||
|
|
||||||
const padding: Hooks.FC<PaddingProps> = (props, hooks) => {
|
const padding: Hooks.FC<PaddingProps> = (props, _hooks) => {
|
||||||
const {} = hooks
|
|
||||||
const { Padding, PaddingX, PaddingY } = props
|
const { Padding, PaddingX, PaddingY } = props
|
||||||
|
|
||||||
const spreadableProps = { ...props } as Partial<PaddingProps>
|
const spreadableProps = { ...props } as Partial<PaddingProps>
|
||||||
|
|
|
@ -10,12 +10,9 @@ interface hotbarProps extends Roact.JsxInstanceProperties<Frame> {
|
||||||
}
|
}
|
||||||
|
|
||||||
const hotbar: Hooks.FC<hotbarProps> = (props, hooks) => {
|
const hotbar: Hooks.FC<hotbarProps> = (props, hooks) => {
|
||||||
const {} = hooks
|
|
||||||
const {} = props
|
|
||||||
|
|
||||||
const spreadableProps = { ...props } as Partial<hotbarProps>
|
const spreadableProps = { ...props } as Partial<hotbarProps>
|
||||||
|
|
||||||
const { world, clientState } = useWorldContext(hooks)
|
const { clientState } = useWorldContext(hooks)
|
||||||
|
|
||||||
const keycodes: Enum.KeyCode[] = [
|
const keycodes: Enum.KeyCode[] = [
|
||||||
Enum.KeyCode.One,
|
Enum.KeyCode.One,
|
||||||
|
|
|
@ -14,17 +14,17 @@ interface slotProps extends Roact.JsxInstanceProperties<Frame> {
|
||||||
}
|
}
|
||||||
|
|
||||||
const slot: Hooks.FC<slotProps> = (props, hooks) => {
|
const slot: Hooks.FC<slotProps> = (props, hooks) => {
|
||||||
const { useEffect } = hooks
|
|
||||||
const { index, keycode, tool } = props
|
const { index, keycode, tool } = props
|
||||||
|
const { useEffect } = hooks
|
||||||
|
|
||||||
const spreadableProps = { ...props } as Partial<slotProps>
|
const spreadableProps = { ...props } as Partial<slotProps>
|
||||||
delete spreadableProps.index
|
delete spreadableProps.index
|
||||||
delete spreadableProps.keycode
|
delete spreadableProps.keycode
|
||||||
delete spreadableProps.tool
|
delete spreadableProps.tool
|
||||||
|
|
||||||
const { world, clientState } = useWorldContext(hooks)
|
const { clientState } = useWorldContext(hooks)
|
||||||
|
|
||||||
const handleActivated = () => {
|
const handleActivated = (): void => {
|
||||||
tool.Parent !== clientState.character
|
tool.Parent !== clientState.character
|
||||||
? clientState.character.Humanoid.EquipTool(tool)
|
? clientState.character.Humanoid.EquipTool(tool)
|
||||||
: clientState.character.Humanoid.UnequipTools()
|
: clientState.character.Humanoid.UnequipTools()
|
||||||
|
@ -52,7 +52,7 @@ const slot: Hooks.FC<slotProps> = (props, hooks) => {
|
||||||
BackgroundTransparency={0.3}
|
BackgroundTransparency={0.3}
|
||||||
Text=""
|
Text=""
|
||||||
Event={{
|
Event={{
|
||||||
Activated: () => {
|
Activated: (): void => {
|
||||||
handleActivated()
|
handleActivated()
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
|
|
@ -7,10 +7,7 @@ interface mainProps extends Roact.JsxInstanceEvents<ScreenGui> {
|
||||||
Change?: Roact.JsxInstanceChangeEvents<ScreenGui>
|
Change?: Roact.JsxInstanceChangeEvents<ScreenGui>
|
||||||
}
|
}
|
||||||
|
|
||||||
const main: Hooks.FC<mainProps> = (props, hooks) => {
|
const main: Hooks.FC<mainProps> = (props, _hooks) => {
|
||||||
const {} = props
|
|
||||||
const {} = hooks
|
|
||||||
|
|
||||||
const spreadableProps = { ...props } as Partial<mainProps>
|
const spreadableProps = { ...props } as Partial<mainProps>
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue