Skip to content

Commit 47b2495

Browse files
committed
配置成功
1 parent 2f150cb commit 47b2495

File tree

5 files changed

+27
-12
lines changed

5 files changed

+27
-12
lines changed

.prettierrc.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
printWidth: 120, //一行的字符数,如果超过会进行换行,默认为80
3+
tabWidth: 2 //一个tab代表几个空格数,默认为2
4+
};

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
"eslint-plugin-react-hooks": "^1.7.0",
4545
"prettier": "1.19.1",
4646
"pretty-quick": "^2.0.1",
47+
"eslint-config-prettier": "^6.7.0",
4748
"eslint-plugin-prettier": "^3.1.1"
4849
}
4950
}

src/App.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import React from 'react';
2-
import logo from './logo.svg';
3-
import './App.css';
1+
import React from "react";
2+
import logo from "./logo.svg";
3+
import "./App.css";
44

55
function App() {
66
return (
@@ -9,10 +9,8 @@ function App() {
99
<img src={logo} className="App-logo" alt="logo" />
1010
<p>
1111
Edit
12-
{' '}
1312
<code>src/App.js</code>
14-
{' '}
15-
and save to reload.
13+
and save to reload.
1614
</p>
1715
{/* <a
1816
className="App-link"

src/index.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import React from 'react';
2-
import ReactDOM from 'react-dom';
3-
import './index.css';
4-
import App from './App';
5-
import * as serviceWorker from './serviceWorker';
1+
import React from "react";
2+
import ReactDOM from "react-dom";
3+
import "./index.css";
4+
import App from "./App";
5+
import * as serviceWorker from "./serviceWorker";
66

7-
ReactDOM.render(<App />, document.getElementById('root'));
7+
ReactDOM.render(<App />, document.getElementById("root"));
88

99
// If you want your app to work offline and load faster, you can change
1010
// unregister() to register() below. Note this comes with some pitfalls.

yarn.lock

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3600,6 +3600,13 @@ eslint-config-airbnb@^18.0.1:
36003600
object.assign "^4.1.0"
36013601
object.entries "^1.1.0"
36023602

3603+
eslint-config-prettier@^6.7.0:
3604+
version "6.7.0"
3605+
resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.7.0.tgz#9a876952e12df2b284adbd3440994bf1f39dfbb9"
3606+
integrity sha512-FamQVKM3jjUVwhG4hEMnbtsq7xOIDm+SY5iBPfR8gKsJoAB2IQnNF+bk1+8Fy44Nq7PPJaLvkRxILYdJWoguKQ==
3607+
dependencies:
3608+
get-stdin "^6.0.0"
3609+
36033610
eslint-config-react-app@^5.0.2:
36043611
version "5.0.2"
36053612
resolved "https://registry.yarnpkg.com/eslint-config-react-app/-/eslint-config-react-app-5.0.2.tgz#df40d73a1402986030680c040bbee520db5a32a4"
@@ -4438,6 +4445,11 @@ get-own-enumerable-property-symbols@^3.0.0:
44384445
resolved "https://registry.yarnpkg.com/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.0.tgz#b877b49a5c16aefac3655f2ed2ea5b684df8d203"
44394446
integrity sha512-CIJYJC4GGF06TakLg8z4GQKvDsx9EMspVxOYih7LerEL/WosUnFIww45CGfxfeKHqlg3twgUrYRT1O3WQqjGCg==
44404447

4448+
get-stdin@^6.0.0:
4449+
version "6.0.0"
4450+
resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-6.0.0.tgz#9e09bf712b360ab9225e812048f71fde9c89657b"
4451+
integrity sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==
4452+
44414453
get-stdin@^7.0.0:
44424454
version "7.0.0"
44434455
resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-7.0.0.tgz#8d5de98f15171a125c5e516643c7a6d0ea8a96f6"

0 commit comments

Comments
 (0)