1
1
mirror of https://github.com/theoludwig/theoludwig.git synced 2025-10-11 17:06:21 +02:00

build(deps): update latest

This commit is contained in:
2025-10-11 16:59:42 +02:00
parent 9c20844d89
commit be738a1c8d
29 changed files with 1456 additions and 1536 deletions

View File

@@ -1,13 +0,0 @@
import typescriptESLint from "typescript-eslint"
import config from "@repo/config-eslint"
export default typescriptESLint.config(...config, {
files: ["**/*.ts", "**/*.tsx"],
languageOptions: {
parser: typescriptESLint.parser,
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
})

View File

@@ -1,29 +0,0 @@
{
"name": "@repo/react-hooks",
"version": "0.0.0-develop",
"private": true,
"type": "module",
"exports": {
"./useBoolean": "./src/useBoolean.ts",
"./useIsMounted": "./src/useIsMounted.ts"
},
"scripts": {
"lint:eslint": "eslint src --max-warnings 0",
"lint:typescript": "tsc --noEmit"
},
"dependencies": {
"react": "catalog:",
"react-dom": "catalog:"
},
"devDependencies": {
"@repo/config-eslint": "workspace:*",
"@repo/config-typescript": "workspace:*",
"@types/react": "catalog:",
"@types/react-dom": "catalog:",
"@total-typescript/ts-reset": "catalog:",
"eslint": "catalog:",
"playwright": "catalog:",
"typescript": "catalog:",
"typescript-eslint": "catalog:"
}
}

View File

@@ -1,50 +0,0 @@
import { useState } from "react"
export interface UseBooleanOutput {
value: boolean
setValue: React.Dispatch<React.SetStateAction<boolean>>
setTrue: () => void
setFalse: () => void
toggle: () => void
}
export interface UseBooleanInput {
/**
* The initial value of the boolean.
* @default false
*/
initialValue?: boolean
}
/**
* Hook to manage a boolean state.
* @param input
* @returns
*/
export const useBoolean = (input: UseBooleanInput = {}): UseBooleanOutput => {
const { initialValue = false } = input
const [value, setValue] = useState(initialValue)
const toggle = (): void => {
setValue((old) => {
return !old
})
}
const setTrue = (): void => {
setValue(true)
}
const setFalse = (): void => {
setValue(false)
}
return {
value,
setValue,
toggle,
setTrue,
setFalse,
}
}

View File

@@ -1,15 +0,0 @@
import { useEffect, useState } from "react"
export interface UseIsMountedOutput {
isMounted: boolean
}
export const useIsMounted = (): UseIsMountedOutput => {
const [isMounted, setIsMounted] = useState(false)
useEffect(() => {
setIsMounted(true)
}, [])
return { isMounted }
}

View File

@@ -1,7 +0,0 @@
{
"extends": "@repo/config-typescript/tsconfig.json",
"compilerOptions": {
"lib": ["DOM", "DOM.Iterable", "ESNext"],
"types": ["@total-typescript/ts-reset"]
}
}