Skip to content

Commit b14a7c2

Browse files
committed
fix lint and test
1 parent 741eb17 commit b14a7c2

File tree

4 files changed

+11
-8
lines changed

4 files changed

+11
-8
lines changed

app/routes/_app+/_layout.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@ export default function Layout() {
8787
</div>
8888
</nav>
8989
</header>
90-
<div className="flex-1">
90+
<main className="flex-1">
9191
<Outlet />
92-
</div>
92+
</main>
9393
<footer className="container my-4 flex items-center justify-between pb-5">
9494
<div className="flex items-center gap-4">
9595
<Logo />
@@ -153,7 +153,7 @@ function UserDropdown() {
153153
<Link
154154
to={`/users/${user.username}`}
155155
// this is for progressive enhancement
156-
onClick={e => e.preventDefault()}
156+
onClick={(e) => e.preventDefault()}
157157
className="flex items-center gap-2"
158158
>
159159
<span className="text-body-sm font-bold">
@@ -181,7 +181,7 @@ function UserDropdown() {
181181
<DropdownMenuItem
182182
asChild
183183
// this prevents the menu from closing before the form submission is completed
184-
onSelect={event => {
184+
onSelect={(event) => {
185185
event.preventDefault()
186186
submit(formRef.current)
187187
}}

tests/e2e/onboarding.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ const test = base.extend<{
2121
}>({
2222
getOnboardingData: async ({}, use) => {
2323
const userData = createUser()
24+
// eslint-disable-next-line react-hooks/rules-of-hooks
2425
await use(() => {
2526
const onboardingData = {
2627
...userData,

tests/e2e/send.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ test('Scheduled messages go out on schedule', async ({ page, login }) => {
7878
await page.goto(`/recipients/${recipient.id}/past`)
7979
await expect(page.getByText(/sent 0 messages/i)).toBeVisible()
8080

81-
await prisma.$transaction(async $prisma => {
81+
await prisma.$transaction(async ($prisma) => {
8282
await $prisma.recipient.update({
8383
select: { id: true },
8484
where: { id: recipient.id },

tests/playwright-utils.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ export const test = base.extend<{
6565
}>({
6666
insertNewUser: async ({}, use) => {
6767
let userId: string | undefined = undefined
68-
await use(async options => {
68+
// eslint-disable-next-line react-hooks/rules-of-hooks
69+
await use(async (options) => {
6970
const user = await getOrInsertUser(options)
7071
userId = user.id
7172
return user
@@ -74,7 +75,8 @@ export const test = base.extend<{
7475
},
7576
login: async ({ page }, use) => {
7677
let userId: string | undefined = undefined
77-
await use(async options => {
78+
// eslint-disable-next-line react-hooks/rules-of-hooks
79+
await use(async (options) => {
7880
const user = await getOrInsertUser(options)
7981
userId = user.id
8082
const session = await prisma.session.create({
@@ -123,7 +125,7 @@ export async function waitFor<ReturnValue>(
123125
} catch (e: unknown) {
124126
lastError = e
125127
}
126-
await new Promise(r => setTimeout(r, 100))
128+
await new Promise((r) => setTimeout(r, 100))
127129
}
128130
throw lastError
129131
}

0 commit comments

Comments
 (0)