Skip to content

Commit 1217565

Browse files
committedNov 27, 2023
fix: fix index.css ignored,add eslint to vite,fix some hook bugs
1 parent 6a6b663 commit 1217565

7 files changed

+59
-109
lines changed
 

‎.gitignore

-3
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,4 @@ npm-debug.log*
2222
yarn-debug.log*
2323
yarn-error.log*
2424

25-
# Tailwind processed CSS
26-
index.css
27-
2825
.firebase

‎index.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
<title>Inpaint-web</title>
1010

1111
</head>
12-
<body>
12+
<body class="h-screen">
1313
<noscript>You need to enable JavaScript to run this app.</noscript>
14-
<div id="root"></div>
14+
<div id="root" class="h-full"></div>
1515

1616
<script type="module" src="/src/index.tsx"></script>
1717
</body>

‎package-lock.json

+50-102
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"react-use": "^17.3.1",
1313
"react-zoom-pan-pinch": "^3.3.0",
1414
"vite": "^5.0.2",
15+
"vite-plugin-eslint": "^1.8.1",
1516
"vite-plugin-svgr": "^4.2.0",
1617
"vite-tsconfig-paths": "^4.2.1"
1718
},

‎src/Editor.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import { DownloadIcon, EyeIcon, ViewBoardsIcon } from '@heroicons/react/outline'
44
import React, { useCallback, useEffect, useState, useRef, useMemo } from 'react'
55
import { useWindowSize } from 'react-use'
6-
import { sep } from 'path'
76
import inpaint from './adapters/inpainting'
87
import Button from './components/Button'
98
import Slider from './components/Slider'
@@ -267,6 +266,7 @@ export default function Editor(props: EditorProps) {
267266
scale,
268267
renders,
269268
showOriginal,
269+
hideBrushTimeout,
270270
])
271271

272272
useEffect(() => {

‎src/index.css

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
@import 'tailwindcss/base';
2+
@import 'tailwindcss/components';
3+
@import 'tailwindcss/utilities';

‎vite.config.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import { defineConfig } from 'vitest/config'
22
import react from '@vitejs/plugin-react-swc'
3+
import eslintPlugin from 'vite-plugin-eslint'
34

45
// https://vitejs.dev/config/
56
export default defineConfig({
67
base: '/',
7-
plugins: [react()],
8+
plugins: [react(), eslintPlugin()],
89
test: {
910
globals: true,
1011
environment: 'jsdom',

0 commit comments

Comments
 (0)
Please sign in to comment.