disable annoying warnings

This commit is contained in:
pompurin404 2024-07-30 21:53:26 +08:00
parent e68411a020
commit 713530cae3
No known key found for this signature in database
2 changed files with 18 additions and 3 deletions

View File

@ -3,9 +3,9 @@ import ReactDOM from 'react-dom/client'
import { BrowserRouter } from 'react-router-dom'
import { ThemeProvider as NextThemesProvider } from 'next-themes'
import { NextUIProvider } from '@nextui-org/react'
import App from './App'
import './assets/main.css'
import '@renderer/utils/init'
import '@renderer/assets/main.css'
import App from '@renderer/App'
ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
<React.StrictMode>

View File

@ -0,0 +1,15 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
const originError = console.error
const originWarn = console.warn
console.error = function (...args: any[]): void {
if (typeof args[0] === 'string' && args[0].includes('validateDOMNesting')) {
return
}
originError.call(console, args)
}
console.warn = function (...args): void {
if (typeof args[0] === 'string' && args[0].includes('aria-label')) {
return
}
originWarn.call(console, args)
}