Skip to content

Commit c33330b

Browse files
authored
Merge pull request #6 from fxnoob/prettier
prettier fix
2 parents 375d2b8 + fde125d commit c33330b

File tree

8 files changed

+372
-57
lines changed

8 files changed

+372
-57
lines changed

option-page/App.jsx

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
import React from 'react'
2-
import ReactDOM from 'react-dom'
3-
import Index from './components/'
4-
5-
const Element = document.createElement("div");
6-
Element.setAttribute("id" , "dfghbnjmERHJKFGHNMVBNMFBNMbmvvxnbdgf");
7-
document.body.appendChild(Element);
8-
ReactDOM.render(<Index />, document.getElementById("dfghbnjmERHJKFGHNMVBNMFBNMbmvvxnbdgf"));
1+
import React from "react";
2+
import ReactDOM from "react-dom";
3+
import Index from "./components/";
4+
5+
const Element = document.createElement("div");
6+
Element.setAttribute("id", "dfghbnjmERHJKFGHNMVBNMFBNMbmvvxnbdgf");
7+
document.body.appendChild(Element);
8+
ReactDOM.render(
9+
<Index />,
10+
document.getElementById("dfghbnjmERHJKFGHNMVBNMFBNMbmvvxnbdgf")
11+
);

option-page/components/index.jsx

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
import React from 'react';
1+
import React from "react";
22

33
export default class Index extends React.Component {
4-
constructor(props){
5-
super(props);
6-
}
7-
render() {
8-
return (
9-
<div></div>
10-
);
11-
}
4+
constructor(props) {
5+
super(props);
6+
}
7+
render() {
8+
return <div></div>;
9+
}
1210
}

option-page/option.html

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
<!DOCTYPE html>
22
<html>
3-
<head>
4-
<style>
5-
</style>
6-
</head>
7-
<body>
8-
<div id="app"></div>
9-
<script src="option.bundle.js"></script>
10-
</body>
3+
<head>
4+
<style></style>
5+
</head>
6+
<body>
7+
<div id="app"></div>
8+
<script src="option.bundle.js"></script>
9+
</body>
1110
</html>
12-

package.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@
66
"scripts": {
77
"start": "webpack-dev-server --config ./webpack.config.js --mode development",
88
"dev": "webpack --watch --progress --colors --config webpack.config.js --mode=development",
9-
"test": "webpack --progress --colors --config webpack.config.js --mode=production"
9+
"build": "webpack --progress --colors --config webpack.config.js --mode=production",
10+
"prettier_check_src": "prettier --check src/**/*.{js,jsx}",
11+
"prettier_check_popup": "prettier --check src/**/*.{js,jsx}",
12+
"prettier_check_option": "prettier --check src/**/*.{js,jsx}",
13+
"prettier_check_content": "prettier --check src/**/*.{js,jsx}",
14+
"test": "yarn prettier_check_src && yarn prettier_check_popup && yarn prettier_check_option && yarn prettier_check_content && yarn build"
1015
},
1116
"husky": {
1217
"hooks": {
@@ -39,6 +44,8 @@
3944
"@babel/runtime": "^7.5.5",
4045
"@material-ui/core": "^4.3.3",
4146
"@material-ui/icons": "^4.2.1",
47+
"husky": "^3.0.9",
48+
"pretty-quick": "^2.0.0",
4249
"react": "^16.8.6",
4350
"react-dom": "^16.8.6"
4451
}

popup-page/App.jsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
import React from 'react'
2-
import ReactDOM from 'react-dom'
3-
import Index from './components/'
1+
import React from "react";
2+
import ReactDOM from "react-dom";
3+
import Index from "./components/";
44

55
const Element = document.createElement("div");
6-
Element.setAttribute("id" , "dfghbnjmERHJKFGHNMVBNMFBNMbmvvxnbdgf");
6+
Element.setAttribute("id", "dfghbnjmERHJKFGHNMVBNMFBNMbmvvxnbdgf");
77
document.body.appendChild(Element);
8-
ReactDOM.render(<Index />, document.getElementById("dfghbnjmERHJKFGHNMVBNMFBNMbmvvxnbdgf"));
8+
ReactDOM.render(
9+
<Index />,
10+
document.getElementById("dfghbnjmERHJKFGHNMVBNMFBNMbmvvxnbdgf")
11+
);

popup-page/components/index.jsx

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
import React from 'react';
1+
import React from "react";
22

33
export default class Index extends React.Component {
4-
constructor(props){
5-
super(props);
6-
}
7-
render() {
8-
return (
9-
<div></div>
10-
);
11-
}
4+
constructor(props) {
5+
super(props);
6+
}
7+
render() {
8+
return <div></div>;
9+
}
1210
}

popup-page/popup.html

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
<!DOCTYPE html>
22
<html>
3-
<head>
4-
<style>
5-
</style>
6-
</head>
7-
<body>
8-
<div id="app"></div>
9-
<script src="popup.bundle.js"></script>
10-
</body>
3+
<head>
4+
<style></style>
5+
</head>
6+
<body>
7+
<div id="app"></div>
8+
<script src="popup.bundle.js"></script>
9+
</body>
1110
</html>
12-

0 commit comments

Comments
 (0)