Skip to content

Commit aae5201

Browse files
committed
eslint issues fixed
1 parent cd55eb4 commit aae5201

File tree

8 files changed

+19
-15
lines changed

8 files changed

+19
-15
lines changed

src/components/atoms/Popover.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const Popover: React.FC<Props> = ({ icon, children }) => (
2020
<Root>
2121
<Trigger asChild>
2222
<button
23-
className="inline-flex h-9 w-9 cursor-default items-center justify-center rounded-full bg-neutral-800 p-3 text-neutral-300 outline-none hover:bg-neutral-600"
23+
className="inline-flex size-9 cursor-default items-center justify-center rounded-full bg-neutral-800 p-3 text-neutral-300 outline-none hover:bg-neutral-600"
2424
aria-label="Update dimensions"
2525
>
2626
{icon}

src/components/atoms/Select.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ const Select: React.FC<Props> = ({
8888
))}
8989
</Group>
9090
{i !== options.length - 1 && (
91-
<Separator className="mx-1 my-2 h-[1px] bg-neutral-600" />
91+
<Separator className="mx-1 my-2 h-px bg-neutral-600" />
9292
)}
9393
</>
9494
))

src/components/atoms/Slider.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const Slider: React.FC<Props> = ({
2828
<Track className="relative h-[3px] grow rounded-full bg-neutral-600">
2929
<Range className="absolute h-full rounded-full bg-neutral-300" />
3030
</Track>
31-
<Thumb className="block h-5 w-5 rounded-[10px] bg-neutral-300 shadow-md hover:bg-neutral-400 focus:shadow-[0_0_0_5px] focus:shadow-neutral-100/40 focus:outline-none" />
31+
<Thumb className="block size-5 rounded-[10px] bg-neutral-300 shadow-md hover:bg-neutral-400 focus:shadow-[0_0_0_5px] focus:shadow-neutral-100/40 focus:outline-none" />
3232
</Root>
3333
</form>
3434
)

src/main.tsx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,12 @@ const router = createBrowserRouter([
3939
},
4040
])
4141

42-
ReactDOM.createRoot(document.getElementById("root")!).render(
43-
<React.StrictMode>
44-
<RouterProvider router={router} />
45-
</React.StrictMode>
46-
)
42+
const rootElement = document.getElementById("root")
43+
44+
if (rootElement) {
45+
ReactDOM.createRoot(rootElement).render(
46+
<React.StrictMode>
47+
<RouterProvider router={router} />
48+
</React.StrictMode>
49+
)
50+
}

src/pages/404.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
import * as React from "react"
22

3-
interface Props {}
4-
5-
const NotFound: React.FC<Props> = () => {
3+
const NotFound: React.FC = () => {
64
return (
7-
<div className="h-screen grid place-content-center text-center">
5+
<div className="grid h-screen place-content-center text-center">
86
<div className="bg-neutral-950 p-5">
9-
<h1 className="font-semibold text-xl mb-1">Not Found</h1>
10-
<p>the page you're looking for doesn't exists.</p>
7+
<h1 className="mb-1 text-xl font-semibold">Not Found</h1>
8+
<p>the page you&apos;re looking for doesn&apos;t exists.</p>
119
</div>
1210
</div>
1311
)

src/pages/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@ import Select from "src/components/atoms/Select"
1111
import Popover from "src/components/atoms/Popover"
1212
import GithubLink from "src/components/GithubLink"
1313
import Slider from "src/components/atoms/Slider"
14+
import { type JSX } from "react/jsx-runtime"
1415

1516
type DISPLAY_TYPES = "table" | "bar" | "pie" | "line" | "area" | "map"
1617

1718
const HomePage: React.FC = () => {
19+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
1820
const [size, setSize] = React.useState(10)
1921
const [fileData, setFileData] = React.useState<Array<Record<string, any>>>([])
2022
const [fields, setFields] = React.useState<string[]>([])

src/pages/pie.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import React from "react"
22

3-
import classNames from "src/utils/classNames"
43
import PieChart from "src/components/PieChart"
54

65
const nivoData = [

src/vite-env.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
// eslint-disable-next-line @typescript-eslint/triple-slash-reference
12
/// <reference types="vite/client" />

0 commit comments

Comments
 (0)