Skip to content
This repository has been archived by the owner on Jan 25, 2024. It is now read-only.

Commit

Permalink
Resolve type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
floriandejonckheere committed Nov 22, 2023
1 parent f404b1f commit 7bf9aac
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 27 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
"@types/eslint-config-prettier": "^6.11.3",
"@types/node": "20.9.3",
"@types/react": "^18.2.38",
"@types/react-dom": "^18.2.16",
"@typescript-eslint/eslint-plugin": "^6.12.0",
"@typescript-eslint/parser": "^6.12.0",
"@vitejs/plugin-react": "^4.2.0",
Expand Down
1 change: 1 addition & 0 deletions src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import { BrowserRouter, Route, Routes, Navigate } from 'react-router-dom'
// @ts-expect-error

Check failure on line 3 in src/main.tsx

View workflow job for this annotation

GitHub Actions / Lint

Include a description after the "@ts-expect-error" directive to explain why the @ts-expect-error is necessary. The description must be 3 characters or longer
import { createRoot } from 'react-dom/client'
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
import { useLocalStorage } from '@uidotdev/usehooks'
Expand Down
4 changes: 2 additions & 2 deletions src/pages/auth/signin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ export default function Signin(): ReactElement {
</div>

<div className="mt-5">
<form>
{/* @ts-expect-error */}

Check failure on line 51 in src/pages/auth/signin.tsx

View workflow job for this annotation

GitHub Actions / Lint

Include a description after the "@ts-expect-error" directive to explain why the @ts-expect-error is necessary. The description must be 3 characters or longer
<form onSubmit={mutation.mutate}>
<div className="grid gap-y-4">
{mutation.isError && (
<p className="text-sm text-red-600 font-bold">
Expand Down Expand Up @@ -93,7 +94,6 @@ export default function Signin(): ReactElement {
<button
type="submit"
className="w-full mt-4 py-3 px-4 inline-flex justify-center items-center gap-x-2 text-sm font-semibold rounded-lg border border-transparent bg-sky-700 text-white hover:bg-sky-900 disabled:opacity-50 disabled:pointer-events-none dark:focus:outline-none dark:focus:ring-1 dark:focus:ring-gray-600"
onClick={mutation.mutate}
disabled={mutation.isPending}
>
{mutation.isPending ? <Spinner /> : 'Sign in'}
Expand Down
4 changes: 2 additions & 2 deletions src/pages/auth/signup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ export default function Signup(): ReactElement {
</div>

<div className="mt-5">
<form>
{/* @ts-expect-error */}

Check failure on line 47 in src/pages/auth/signup.tsx

View workflow job for this annotation

GitHub Actions / Lint

Include a description after the "@ts-expect-error" directive to explain why the @ts-expect-error is necessary. The description must be 3 characters or longer
<form onSubmit={mutation.mutate}>
<div className="grid gap-y-4">
{mutation.isError && (
<p className="text-sm text-red-600 font-bold">
Expand Down Expand Up @@ -106,7 +107,6 @@ export default function Signup(): ReactElement {
<button
type="submit"
className="w-full mt-4 py-3 px-4 inline-flex justify-center items-center gap-x-2 text-sm font-semibold rounded-lg border border-transparent bg-sky-700 text-white hover:bg-sky-900 disabled:opacity-50 disabled:pointer-events-none dark:focus:outline-none dark:focus:ring-1 dark:focus:ring-gray-600"
onClick={mutation.mutate}
disabled={mutation.isPending}
>
{mutation.isPending ? <Spinner /> : 'Sign up'}
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@
"noEmit": true,
"jsx": "react-jsx"
},
"include": ["./src"]
"include": ["./src"],
"exclude": ["./node_modules"]
}
21 changes: 0 additions & 21 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1221,26 +1221,6 @@ __metadata:
languageName: node
linkType: hard

"@types/react-dom@npm:^18.2.16":
version: 18.2.16
resolution: "@types/react-dom@npm:18.2.16"
dependencies:
"@types/react": "npm:*"
checksum: 6efd8936c103b17d24c33fbba9f90aa390559b9027308a20bc08a4af84c2b915a5f615149d106768b14c3b04796cc70e5759ae01fb2d20b307b75697e38473cd
languageName: node
linkType: hard

"@types/react@npm:*":
version: 17.0.38
resolution: "@types/react@npm:17.0.38"
dependencies:
"@types/prop-types": "npm:*"
"@types/scheduler": "npm:*"
csstype: "npm:^3.0.2"
checksum: 828cd27ac220be8232535c4451b0020f6f05535d62407e5fe2547544a7d3123777ed31ab547d7c7f3d8b59d37268ee4b9209f1c110809f084cbbf0a7e27cd7ef
languageName: node
linkType: hard

"@types/react@npm:^18.2.38":
version: 18.2.38
resolution: "@types/react@npm:18.2.38"
Expand Down Expand Up @@ -6443,7 +6423,6 @@ __metadata:
"@types/eslint-config-prettier": "npm:^6.11.3"
"@types/node": "npm:20.9.3"
"@types/react": "npm:^18.2.38"
"@types/react-dom": "npm:^18.2.16"
"@typescript-eslint/eslint-plugin": "npm:^6.12.0"
"@typescript-eslint/parser": "npm:^6.12.0"
"@uidotdev/usehooks": "npm:^2.4.1"
Expand Down

0 comments on commit 7bf9aac

Please sign in to comment.