Skip to content

Commit

Permalink
chore: update deps, and apply new lint rules
Browse files Browse the repository at this point in the history
  • Loading branch information
Arcath committed Oct 30, 2024
1 parent 018effe commit a7c440c
Show file tree
Hide file tree
Showing 25 changed files with 1,049 additions and 991 deletions.
83 changes: 0 additions & 83 deletions .eslintrc.cjs

This file was deleted.

7 changes: 5 additions & 2 deletions app/entry.server.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@

import {PassThrough} from 'node:stream'

import type {AppLoadContext, EntryContext} from '@remix-run/node'
import {createReadableStreamFromReadable} from '@remix-run/node'
import {
type AppLoadContext,
type EntryContext,
createReadableStreamFromReadable
} from '@remix-run/node'
import {RemixServer} from '@remix-run/react'
import {isbot} from 'isbot'
import {renderToPipeableStream} from 'react-dom/server'
Expand Down
1 change: 0 additions & 1 deletion app/lib/components/button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ export const AButton = (
) => {
const className = `${ButtonClasses} inline-block ${props.className}`

// eslint-disable-next-line jsx-a11y/anchor-has-content
return <a {...omit(props, ['className'])} className={className} />
}

Expand Down
3 changes: 0 additions & 3 deletions app/lib/components/input.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable react/prop-types */

import {omit} from '@arcath/utils'

export const inputClasses =
Expand Down Expand Up @@ -43,7 +41,6 @@ export const Label = (
) => {
const className = `mt-2 ${props.className}`

// eslint-disable-next-line jsx-a11y/label-has-associated-control
return <label {...omit(props, ['className'])} className={className} />
}

Expand Down
2 changes: 1 addition & 1 deletion app/lib/fields/relation.server.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {FieldHandlers} from './field.server'
import {type FieldHandlers} from './field.server'

const metaSave: FieldHandlers['metaSave'] = formData => {
return formData.get('meta') as string
Expand Down
1 change: 0 additions & 1 deletion app/lib/fields/relation.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable react/prop-types */
import {useState} from 'react'
import {useQuery} from '@tanstack/react-query'

Expand Down
1 change: 0 additions & 1 deletion app/lib/prisma.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {PrismaClient} from '@prisma/client'
declare global {
// This prevents us from making multiple connections to the db when the
// require cache is cleared.
// eslint-disable-next-line
var __prisma: PrismaClient | undefined
}

Expand Down
2 changes: 1 addition & 1 deletion app/routes/api.backup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const loader = async ({request}: LoaderFunctionArgs) => {
ensureUser(request, 'system', {})
)

addJob('createBackup', {})
await addJob('createBackup', {})

return json({user}, {headers: headers()})
}
Expand Down
2 changes: 1 addition & 1 deletion app/routes/app.$assetslug.$entry.delete.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
type LoaderFunctionArgs,
type ActionFunctionArgs,
MetaFunction,
type MetaFunction,
json,
redirect
} from '@remix-run/node'
Expand Down
4 changes: 2 additions & 2 deletions app/routes/app.$assetslug.import.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@ const AssetImport = () => {
})

dispatchImportedCount()
})
}).catch(e => console.error(e))
}
}, [stage, csvDetails])
}, [stage, csvDetails, asset.slug, columnMappings])

switch (stage) {
default:
Expand Down
2 changes: 0 additions & 2 deletions app/routes/app._index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable @typescript-eslint/no-explicit-any */

import {
type LoaderFunctionArgs,
type MetaFunction,
Expand Down
4 changes: 2 additions & 2 deletions app/routes/app.acl-manager.$acl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
type LoaderFunctionArgs,
type MetaFunction,
json,
ActionFunction,
type ActionFunction,
redirect
} from '@remix-run/node'
import {useLoaderData} from '@remix-run/react'
Expand Down Expand Up @@ -47,7 +47,7 @@ export const action: ActionFunction = async ({request, params}) => {
where: {aclId: params.acl}
})

asyncForEach(aclEntries, async ({id}) => {
await asyncForEach(aclEntries, async ({id}) => {
const read = formData.get(`${id}-read`) === 'on'
const write = formData.get(`${id}-write`) === 'on'
const del = formData.get(`${id}-delete`) === 'on'
Expand Down
8 changes: 4 additions & 4 deletions app/routes/app.passwords.$password._index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ const AssetManagerAsset = () => {
<span>
{isPending ? '⌛' : data}{' '}
<button
onClick={() => {
navigator.clipboard.writeText(data)
onClick={async () => {
await navigator.clipboard.writeText(data)
notify({
title: 'Copied',
message: 'Copied password to the clipboard',
Expand All @@ -92,9 +92,9 @@ const AssetManagerAsset = () => {
</span>
) : (
<button
onClick={() => {
onClick={async () => {
setPasswordOpen(true)
refetch()
await refetch()
}}
>
🔒
Expand Down
4 changes: 2 additions & 2 deletions app/routes/app.process.$process._index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ export const meta: MetaFunction<typeof loader> = ({data, matches}) => {
const ProcessView = () => {
const {process, code} = useLoaderData<typeof loader>()

const handleCheckbox: EventListener = ({target}) => {
const handleCheckbox: EventListener = async ({target}) => {
const index = (target! as HTMLInputElement).dataset.index

fetch(`/api/process/${process.id}/toggle/${index}`).then(() => {
await fetch(`/api/process/${process.id}/toggle/${index}`).then(() => {
location.reload()
})
}
Expand Down
4 changes: 2 additions & 2 deletions app/routes/app.system.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ const System = () => {
</ul>
<Button
className="bg-success"
onClick={() => {
fetch('/api/backup')
onClick={async () => {
await fetch('/api/backup')
}}
>
Backup Now
Expand Down
4 changes: 2 additions & 2 deletions app/routes/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ const SearchModal = ({close}: {close: () => void}) => {
<div className="fixed bg-white border-gray-300 border shadow-xl p-4 top-64 w-[60em] left-[calc(50%-30rem)]">
<h2 className="text-[#444] text-2xl">Search</h2>
<form
onSubmit={e => {
onSubmit={async e => {
e.preventDefault()
search.mutateAsync(searchTerm)
await search.mutateAsync(searchTerm)
}}
>
<Label>
Expand Down
2 changes: 1 addition & 1 deletion app/routes/app.user.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
type LoaderFunctionArgs,
type MetaFunction,
json,
ActionFunction
type ActionFunction
} from '@remix-run/node'
import {useLoaderData, Outlet, useActionData} from '@remix-run/react'
import {useQueryClient} from '@tanstack/react-query'
Expand Down
Loading

0 comments on commit a7c440c

Please sign in to comment.