Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
mudkipme committed Dec 19, 2024
1 parent 2801e8b commit 6a28a9d
Show file tree
Hide file tree
Showing 49 changed files with 2,820 additions and 2,595 deletions.
16 changes: 11 additions & 5 deletions eslint.config.cjs → eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
const love = require('eslint-config-love')
const reactHooks = require('eslint-plugin-react-hooks')
import love from 'eslint-config-love'
import reactHooks from 'eslint-plugin-react-hooks'

module.exports = [
export default [
{
ignores: ['**/build/', '**/dist/', 'node_modules/', 'eslint.config.mjs'],
},
{
...love,
files: ['packages/**/*.ts', 'packages/**/*.tsx'],
Expand All @@ -15,7 +18,6 @@ module.exports = [
project: ['./packages/*/tsconfig.json']
}
},
ignores: ['build', 'dist', 'node_modules', 'eslint.config.cjs'],
rules: {
...love.rules,
...reactHooks.configs.recommended.rules,
Expand All @@ -26,7 +28,11 @@ module.exports = [
properties: false
}
}
]
],
'@typescript-eslint/prefer-destructuring': 'off',
'complexity': 'off',
'@typescript-eslint/no-magic-numbers': 'off',
'@typescript-eslint/no-unsafe-type-assertion': 'off'
}
}
]
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
"build": "pnpm run -r build"
},
"devDependencies": {
"eslint": "^8.57.0",
"eslint-config-love": "^53.0.0",
"eslint-plugin-react-hooks": "^4.6.2",
"typescript": "^5.5.3"
"eslint": "^9.17.0",
"eslint-config-love": "^112.0.0",
"eslint-plugin-react-hooks": "^5.1.0",
"typescript": "^5.7.2"
}
}
24 changes: 12 additions & 12 deletions packages/klinklang-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@
"url": "https://github.com/mudkipme/klinklang/issues"
},
"devDependencies": {
"vite": "^5.3.3"
"vite": "^6.0.3"
},
"dependencies": {
"@emotion/react": "^11.11.4",
"@emotion/styled": "^11.11.5",
"@mui/icons-material": "^5.15.21",
"@mui/material": "^5.15.21",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@vitejs/plugin-react": "^4.3.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-router-dom": "^6.24.0",
"zustand": "^4.5.4"
"@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.0",
"@mui/icons-material": "^6.2.1",
"@mui/material": "^6.2.1",
"@types/react": "^19.0.2",
"@types/react-dom": "^19.0.2",
"@vitejs/plugin-react": "^4.3.4",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-router": "^7.0.2",
"zustand": "^5.0.2"
}
}
2 changes: 1 addition & 1 deletion packages/klinklang-client/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Box, Drawer, Toolbar, Typography } from '@mui/material'
import React, { useEffect, useState } from 'react'
import { Outlet } from 'react-router-dom'
import { Outlet } from 'react-router'
import { KlinklangFooter } from './components/Footer'
import { KlinklangHeader } from './components/Header'
import { KlinklangMenu } from './components/Menu'
Expand Down
16 changes: 7 additions & 9 deletions packages/klinklang-client/src/components/Footer/index.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import { Container, Link, Typography } from '@mui/material'
import React from 'react'

export const KlinklangFooter: React.FC = () => {
return (
<Container sx={{ padding: 2 }}>
<Typography variant='body2'>
&copy; <Link href='https://52poke.wiki' color='inherit'>52Poké Wiki</Link>
</Typography>
</Container>
)
}
export const KlinklangFooter: React.FC = () => (
<Container sx={{ padding: 2 }}>
<Typography variant='body2'>
&copy; <Link href='https://52poke.wiki' color='inherit'>52Poké Wiki</Link>
</Typography>
</Container>
)
4 changes: 2 additions & 2 deletions packages/klinklang-client/src/components/Header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
Typography
} from '@mui/material'
import React, { useCallback, useState } from 'react'
import { useNavigate } from 'react-router-dom'
import { useNavigate } from 'react-router'
import { useUserStore } from '../../store/user'

export interface KlinklangHeaderProps {
Expand Down Expand Up @@ -75,7 +75,7 @@ export const KlinklangHeader: React.FC<KlinklangHeaderProps> = ({ onDrawerOpen }
? [
<MenuItem
onClick={() => {
navigate('/pages/settings')
void navigate('/pages/settings')
setAnchorEl(null)
}}
key='settings'
Expand Down
2 changes: 1 addition & 1 deletion packages/klinklang-client/src/components/Menu/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { List, ListItem, ListItemButton, ListItemText } from '@mui/material'
import React from 'react'
import { useLocation } from 'react-router-dom'
import { useLocation } from 'react-router'

const menus = [
{
Expand Down
7 changes: 3 additions & 4 deletions packages/klinklang-client/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { ThemeProvider } from '@emotion/react'
import { CssBaseline } from '@mui/material'
import { CssBaseline, ThemeProvider } from '@mui/material'
import * as React from 'react'
import * as ReactDOM from 'react-dom/client'
import { createBrowserRouter, RouterProvider } from 'react-router-dom'
import { createBrowserRouter, RouterProvider } from 'react-router'
import { App } from './App'
import { Settings } from './pages/Settings'
import { TermReplacer } from './pages/TermReplacer'
Expand Down Expand Up @@ -34,7 +33,7 @@ const router = createBrowserRouter([
}
])

// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- root element is always present
ReactDOM.createRoot(document.getElementById('root')!).render(
<React.StrictMode>
<ThemeProvider theme={theme}>
Expand Down
18 changes: 9 additions & 9 deletions packages/klinklang-client/src/pages/Settings/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
Card,
CardContent,
Container,
Grid,
Grid2,
IconButton,
List,
ListItem,
Expand Down Expand Up @@ -52,14 +52,14 @@ export const Settings: React.FC = () => {

return (
<Container sx={{ my: 2 }}>
<Grid container spacing={2}>
{(currentUser?.fediAccounts?.length ?? 0) > 0 && (
<Grid item xs={12} sm={6}>
<Grid2 container spacing={2}>
{(currentUser?.fediAccounts.length ?? 0) > 0 && (
<Grid2 size={{ xs: 12, sm: 2 }}>
<Card>
<CardContent>
<Typography variant='h5'>Linked ActivityPub accounts</Typography>
<List>
{currentUser?.fediAccounts?.map((account) => (
{currentUser?.fediAccounts.map((account) => (
<ListItem
key={account.subject}
disablePadding
Expand All @@ -80,9 +80,9 @@ export const Settings: React.FC = () => {
</List>
</CardContent>
</Card>
</Grid>
</Grid2>
)}
<Grid item xs={12} sm={6}>
<Grid2 size={{ xs: 12, sm: 6 }}>
<Card>
<CardContent>
<Typography variant='h5' mb={2}>Link to a new ActivityPub account</Typography>
Expand All @@ -99,8 +99,8 @@ export const Settings: React.FC = () => {
</Stack>
</CardContent>
</Card>
</Grid>
</Grid>
</Grid2>
</Grid2>
</Container>
)
}
42 changes: 21 additions & 21 deletions packages/klinklang-client/src/pages/TermReplacer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
Divider,
FormControl,
FormControlLabel,
Grid,
Grid2,
InputLabel,
MenuItem,
Select,
Expand Down Expand Up @@ -77,8 +77,8 @@ export const TermReplacer: React.FC = () => {

return (
<Container>
<Grid container my={2} spacing={2}>
<Grid item xs={6} sm={5}>
<Grid2 container my={2} spacing={2}>
<Grid2 size={{ xs: 6, sm: 5 }}>
<FormControl fullWidth>
<InputLabel id='label-from'>From</InputLabel>
<Select
Expand All @@ -94,8 +94,8 @@ export const TermReplacer: React.FC = () => {
))}
</Select>
</FormControl>
</Grid>
<Grid item xs={6} sm={5}>
</Grid2>
<Grid2 size={{ xs: 6, sm: 5 }}>
<FormControl fullWidth>
<InputLabel id='label-to'>To</InputLabel>
<Select
Expand All @@ -112,15 +112,15 @@ export const TermReplacer: React.FC = () => {
))}
</Select>
</FormControl>
</Grid>
<Grid item xs={12} sm={2}>
</Grid2>
<Grid2 size={{ xs: 12, sm: 2 }}>
<Button size='large' variant='contained' fullWidth onClick={replace}>Replace</Button>
</Grid>
</Grid>
</Grid2>
</Grid2>

<Grid container my={2} spacing={2}>
<Grid2 container my={2} spacing={2}>
{categories.map((category) => (
<Grid item xs={6} sm={3} md={2} key={category.value}>
<Grid2 size={{ xs: 6, sm: 3, md: 2 }} key={category.value}>
<FormControlLabel
control={
<Checkbox
Expand All @@ -133,9 +133,9 @@ export const TermReplacer: React.FC = () => {
}
label={category.text}
/>
</Grid>
</Grid2>
))}
<Grid item xs={12} sm={3} md={2}>
<Grid2 size={{ xs: 12, sm: 3, md: 2 }}>
<FormControlLabel
control={
<Checkbox
Expand All @@ -147,13 +147,13 @@ export const TermReplacer: React.FC = () => {
}
label='Select All'
/>
</Grid>
</Grid>
</Grid2>
</Grid2>

<Divider />

<Grid container my={2} spacing={2}>
<Grid item xs={12} sm={6}>
<Grid2 container my={2} spacing={2}>
<Grid2 size={{ xs: 12, sm: 6 }}>
<TextField
label='Source'
required
Expand All @@ -162,8 +162,8 @@ export const TermReplacer: React.FC = () => {
rows={10}
inputRef={sourceEl}
/>
</Grid>
<Grid item xs={12} sm={6}>
</Grid2>
<Grid2 size={{ xs: 12, sm: 6 }}>
<TextField
label='Result'
disabled
Expand All @@ -172,8 +172,8 @@ export const TermReplacer: React.FC = () => {
rows={10}
value={result}
/>
</Grid>
</Grid>
</Grid2>
</Grid2>
</Container>
)
}
4 changes: 1 addition & 3 deletions packages/klinklang-client/src/pages/Workflows/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { Container, Typography } from '@mui/material'
import React from 'react'

export const Workflows: React.FC = () => {
return (
export const Workflows: React.FC = () => (
<Container>
<Typography
sx={{
Expand All @@ -16,4 +15,3 @@ export const Workflows: React.FC = () => {
</Typography>
</Container>
)
}
2 changes: 1 addition & 1 deletion packages/klinklang-client/src/store/user.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { create } from 'zustand'
import { type User } from '../interfaces'
import type { User } from '../interfaces'

export interface UserState {
currentUser: User | null
Expand Down
4 changes: 2 additions & 2 deletions packages/klinklang-client/src/theme.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { createTheme } from '@mui/material/styles'
import React from 'react'
import { Link as RouterLink, type LinkProps as RouterLinkProps } from 'react-router-dom'
import { Link as RouterLink, type LinkProps as RouterLinkProps } from 'react-router'

const LinkBehavior = React.forwardRef<
HTMLAnchorElement,
Expand All @@ -17,7 +17,7 @@ const theme = createTheme({
component: LinkBehavior
}
},
MuiButtonBase: {
MuiListItemButton: {
defaultProps: {
LinkComponent: LinkBehavior
}
Expand Down
4 changes: 2 additions & 2 deletions packages/klinklang-prisma/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
"main": "./index.js",
"typings": "./index.d.ts",
"dependencies": {
"@prisma/client": "^5.16.1"
"@prisma/client": "^6.1.0"
},
"devDependencies": {
"prisma": "^5.16.1"
"prisma": "^6.1.0"
}
}
Loading

0 comments on commit 6a28a9d

Please sign in to comment.