Skip to content

Commit be5b541

Browse files
committed
add prettier precommit hook
1 parent a572432 commit be5b541

File tree

4 files changed

+465
-26
lines changed

4 files changed

+465
-26
lines changed

example/entry.js

+5-8
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
1-
import React from 'react';
2-
import ReactDOM from 'react-dom';
3-
import Hello from './hello';
1+
import React from 'react'
2+
import ReactDOM from 'react-dom'
3+
import Hello from './hello'
44

55
let color = {
6-
sampleColor: 'papayawhip'
6+
sampleColor: 'papayawhip'
77
}
88

9-
ReactDOM.render(
10-
<Hello color={color} />,
11-
document.getElementById('container')
12-
);
9+
ReactDOM.render(<Hello color={color} />, document.getElementById('container'))

example/hello.js

+17-17
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
1-
import React from 'react';
1+
import React from 'react'
22
//import css from 'css-constructor'; // production - use this!
3-
import css from './css-constructor'; // development - for me
3+
import css from './css-constructor' // development - for me
44

55
export default class Hello extends React.Component {
6+
/* javascript constructor */
7+
constructor(props) {
8+
super(props)
9+
}
610

7-
/* javascript constructor */
8-
constructor (props) {
9-
super(props);
10-
}
11-
12-
/* css constructor */
13-
@css`
11+
/* css constructor */
12+
@css`
1413
font-size: 16px;
1514
text-align: center;
1615
@@ -35,11 +34,12 @@ export default class Hello extends React.Component {
3534
& {font-size: 18px;}
3635
}
3736
`
38-
39-
render () {
40-
return (<div className="existing">
41-
<img src="https://github.com/siddharthkp.png"/>
42-
<div id="handle">@siddharthkp</div>
43-
</div>)
44-
}
45-
};
37+
render() {
38+
return (
39+
<div className="existing">
40+
<img src="https://github.com/siddharthkp.png" />
41+
<div id="handle">@siddharthkp</div>
42+
</div>
43+
)
44+
}
45+
}

0 commit comments

Comments
 (0)