From 218288e83b9fada48dc5f8a13ce5a55445b730c8 Mon Sep 17 00:00:00 2001 From: maochaoying <925670706@qq.com> Date: Thu, 24 Aug 2023 10:38:51 +0800 Subject: [PATCH] =?UTF-8?q?=E9=85=8D=E7=BD=AEprettier?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .prettierrc | 4 +++- package.json | 1 + src/App.jsx | 26 ++++++++++++++++++-------- src/main.jsx | 9 ++++++--- yarn.lock | 5 +++++ 5 files changed, 33 insertions(+), 12 deletions(-) diff --git a/.prettierrc b/.prettierrc index ff5c734..696b19a 100644 --- a/.prettierrc +++ b/.prettierrc @@ -5,5 +5,7 @@ "trailingComma": "all", "arrowParens": "avoid", "tabWidth": 2, - "endOfLine": "lf" + "endOfLine": "lf", + "jsxSingleQuote": true, + "jsxBracketSameLine": false } diff --git a/package.json b/package.json index edff1e4..52ab708 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,7 @@ "eslint-plugin-react": "^7.32.2", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-refresh": "^0.4.3", + "prettier": "^3.0.2", "vite": "^4.4.5" } } diff --git a/src/App.jsx b/src/App.jsx index 871539b..f604890 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -1,11 +1,21 @@ -import {Button} from 'antd' +import { Component } from 'react' +import { Button } from 'antd' +import { Routes, Route } from 'react-router-dom' -function App() { - return ( - <> - - > - ) +const Home = () => { + return