From c10b61983c955a8b006ff0898d1af58f77f64388 Mon Sep 17 00:00:00 2001 From: lot Date: Wed, 9 Aug 2023 10:54:23 +0800 Subject: [PATCH] =?UTF-8?q?todo:=20error=20=E6=94=B9=E4=B8=BA=20warning=20?= =?UTF-8?q?,=20=E5=BE=85=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .eslintrc.json | 11 ++++++++++- src/index.jsx | 19 +++++++++---------- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index b63a4a3..6980840 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -6,6 +6,7 @@ "extends": [ "standard", "plugin:react/recommended", + "plugin:react/jsx-runtime", "prettier" ], "parserOptions": { @@ -16,7 +17,15 @@ "react" ], "rules": { - // "no-useless-constructor": "off", + "no-useless-constructor": "off", + "react/prop-types": "off", + "eqeqeq": [1], + "no-empty": [1], + "no-extend-native": [1], + "no-prototype-builtins": [1], + "prefer-const": [1], + // "new-cap": [1], + "array-callback-return": [1], "semi": [ "error", "always" diff --git a/src/index.jsx b/src/index.jsx index 931782b..65147d0 100644 --- a/src/index.jsx +++ b/src/index.jsx @@ -3,23 +3,22 @@ import ReactDOM from 'react-dom/client'; import './index.css'; import App from './App'; import reportWebVitals from './reportWebVitals'; -import {stores_Context} from './config'; -import rootStore from "./stores/Index"; -import {Spin} from "antd"; +import { stores_Context } from './config'; +import RootStore from './stores/Index'; +import { Spin } from 'antd'; const root = ReactDOM.createRoot(document.getElementById('root')); -const stores=new rootStore(); +const stores = new RootStore(); root.render( - - - - - + + + + + ); - // If you want to start measuring performance in your app, pass a function // to log results (for example: reportWebVitals(console.log)) // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals