diff --git a/.eslintrc.json b/.eslintrc.json
index 16362692..d594b38f 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -28,7 +28,7 @@
}
],
"semi": "off",
- "no-use-before-define": "off",
+ "no-use-before-define": "warn",
"comma-dangle": "off",
"space-before-function-paren": "off",
"multiline-ternary": "off",
@@ -54,8 +54,8 @@
"array-callback-return": "off",
"no-shadow": "off",
"no-inner-declarations": "off",
- "no-unused-expressions": "off",
- "no-unused-vars": "off",
+ "no-unused-expressions": "warn",
+ "no-unused-vars": "warn",
"no-plusplus": "off"
}
}
diff --git a/babel.config.js b/babel.config.js
index c1079963..b7d93664 100644
--- a/babel.config.js
+++ b/babel.config.js
@@ -3,7 +3,6 @@ const plugins = [
['@babel/plugin-proposal-decorators', { legacy: true }],
['@babel/plugin-transform-runtime'],
['@babel/plugin-transform-modules-commonjs'],
- [require('babel-plugin-await-add-trycatch')],
]
module.exports = {
@@ -12,7 +11,7 @@ module.exports = {
[
'@babel/preset-react',
{
- runtime: 'automatic',
+ runtime: 'automatic', // classic
},
],
'@babel/typescript',
diff --git a/src/components/hooks/useScrollIntoView/index.jsx b/src/components/hooks/useScrollIntoView/index.jsx
index 78fbeb05..33233595 100644
--- a/src/components/hooks/useScrollIntoView/index.jsx
+++ b/src/components/hooks/useScrollIntoView/index.jsx
@@ -1,7 +1,7 @@
-import { useEffect, useRef, useState } from 'react'
+import React, { useEffect, useRef, useState } from 'react'
const useScrollIntoView = ({ offset = 0 }) => {
- const targetRef = useRef < T > null
+ const targetRef = useRef(null)
const [isScrolled, setIsScrolled] = useState(false)
const scrollIntoView = () => {
diff --git a/src/components/stateless/TextClip/index.jsx b/src/components/stateless/TextClip/index.jsx
index 047f2c26..36e578d6 100644
--- a/src/components/stateless/TextClip/index.jsx
+++ b/src/components/stateless/TextClip/index.jsx
@@ -7,7 +7,7 @@ const TextClips = () => {
Trending
Bootstrap
React
diff --git a/src/pages/home/index.jsx b/src/pages/home/index.jsx
index 969edc38..0ce23096 100644
--- a/src/pages/home/index.jsx
+++ b/src/pages/home/index.jsx
@@ -54,7 +54,12 @@ import SparklesCore from '@stateless/Sparkles'
import firstImage from '@assets/images/88-300x160.jpg'
import secondImage from '@assets/images/2-300x160.jpg'
-import { oneApiChat, prettyObject, randomNum, getDirection } from '@utils/aidFn'
+import {
+ oneApiChat,
+ prettyObject,
+ // randomNum,
+ getDirection,
+} from '@utils/aidFn'
import { fireConfetti } from '@utils/confetti'
import styles from './index.module.less'
diff --git a/src/pages/home/index.module.less b/src/pages/home/index.module.less
index f26e634a..484a0c3f 100644
--- a/src/pages/home/index.module.less
+++ b/src/pages/home/index.module.less
@@ -504,8 +504,10 @@
transform: rotate(6deg);
}
-// backdrop-filter
-// object-fit: cover;
-// object-position: 0 0;
-// isolation: isolate;
-// z-index: 1;
+/* shift + alt +a
+backdrop-filter
+object-fit: cover;
+object-position: 0 0;
+isolation: isolate;
+z-index: 1;
+ */
diff --git a/src/pages/postmessage/index.jsx b/src/pages/postmessage/index.jsx
index 675503c2..ce660807 100644
--- a/src/pages/postmessage/index.jsx
+++ b/src/pages/postmessage/index.jsx
@@ -44,7 +44,7 @@ const PostMessage = () => {
height="600px"
title="my-iframe"
loading="lazy"
- allowfullscreen
+ allowFullScreen
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
referrerPolicy="no-referrer-when-downgrade"
sandbox="allow-scripts allow-same-origin"
@@ -59,7 +59,7 @@ const PostMessage = () => {
allow="accelerometer *; bluetooth *; camera *; encrypted-media *; display-capture *; geolocation *; gyroscope *; microphone *; midi *; clipboard-read *; clipboard-write *; web-share *; serial *; xr-spatial-tracking *"
allowtransparency="true"
allowPaymentRequest="true"
- allowfullscreen="true"
+ allowFullScreen
class="result-iframe"
loading="lazy"
/> */}
diff --git a/src/pages/reactGantt/index.jsx b/src/pages/reactGantt/index.jsx
index 9a38bb52..39fe8302 100644
--- a/src/pages/reactGantt/index.jsx
+++ b/src/pages/reactGantt/index.jsx
@@ -1,4 +1,4 @@
-import React, { useRef, useEffect } from 'react'
+import React, { useRef } from 'react'
import { Gantt, Willow } from 'wx-react-gantt'
import FixTabPanel from '@stateless/FixTabPanel'
import 'wx-react-gantt/dist/gantt.css'
diff --git a/src/pages/video/index.jsx b/src/pages/video/index.jsx
index a3c183d6..32795b16 100644
--- a/src/pages/video/index.jsx
+++ b/src/pages/video/index.jsx
@@ -41,11 +41,11 @@ const MyVideo = () => {
togglePause,
increaseVolume,
decreaseVolume,
- mute,
+ // mute,
unmute,
toggleMute,
forward,
- back,
+ // back,
toggleFullscreen,
} = useVideo(videoRef)
diff --git a/src/utils/aidFn.js b/src/utils/aidFn.js
index ebae959f..5654ebe7 100644
--- a/src/utils/aidFn.js
+++ b/src/utils/aidFn.js
@@ -386,7 +386,8 @@ export const getFileType = (data, fileName) => {
try {
JSON.parse(data)
return 'application/json'
- } catch (e) {
+ } catch (event) {
+ console.log('event', event)
return 'text/plain'
}
} else if (data instanceof Uint8Array || data instanceof ArrayBuffer) {