Skip to content

Commit b6f6093

Browse files
committed
⭐ [Prettier] Add configuration files
1 parent 4b21391 commit b6f6093

File tree

4 files changed

+43
-12
lines changed

4 files changed

+43
-12
lines changed

.editorconfig

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_size = 2
7+
indent_style = space
8+
trim_trailing_whitespace = true

.prettierrc

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"trailingComma": "es5",
3+
"tabWidth": 2,
4+
"semi": false,
5+
"singleQuote": true
6+
}

daipos.code-workspace

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"folders": [
3+
{
4+
"path": "."
5+
}
6+
],
7+
"settings": {
8+
"editor.formatOnSave": true,
9+
"[javascript]": {
10+
"editor.formatOnSave": true
11+
},
12+
"[javascriptreact]": {
13+
"editor.formatOnSave": true
14+
}
15+
}
16+
}

src/redux/actions/item.js

+13-12
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import ACTIONS from '../actionTypes';
1+
import ACTIONS from '../actionTypes'
22

3-
let nextItemId = 0;
3+
let nextItemId = 0
44

55
const add = ({ name, photo, soldCount, count, price }) => ({
66
type: ACTIONS.ADD_ITEM,
@@ -10,20 +10,21 @@ const add = ({ name, photo, soldCount, count, price }) => ({
1010
photo,
1111
soldCount,
1212
count,
13-
price
14-
}
15-
});
13+
price,
14+
},
15+
})
1616

1717
const sell = (id, item) => {
1818
return dispatch => {
1919
// async transaction calls here
20-
item.soldCount += 1;
21-
item.count -= 1;
22-
dispatch({ type: ACTIONS.SELL_ITEM, payload: { id, item } });
23-
};
24-
};
20+
item.soldCount += 1
21+
item.count -= 1
22+
23+
dispatch({ type: ACTIONS.SELL_ITEM, payload: { id, item } })
24+
}
25+
}
2526

2627
export default {
2728
add,
28-
sell
29-
};
29+
sell,
30+
}

0 commit comments

Comments
 (0)