Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Nov 1, 2021. It is now read-only.

Commit4d4f73a

Browse files
committed
chore: merge branch 'naming' into dev
2 parents924748d +5afb3d7 commit4d4f73a

File tree

185 files changed

+992
-987
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

185 files changed

+992
-987
lines changed

‎components/A/index.js‎

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77

88
importReactfrom'react'
9-
importPropTypesfrom'prop-types'
9+
importTfrom'prop-types'
1010
importstyledfrom'styled-components'
1111

1212
exportconstStyledA=styled.a`
@@ -26,13 +26,9 @@ const A = ({ href, target, children }) => (
2626
)
2727

2828
A.propTypes={
29-
href:PropTypes.oneOfType([PropTypes.string,PropTypes.object]).isRequired,
30-
children:PropTypes.oneOfType([
31-
PropTypes.string,
32-
PropTypes.arrayOf(PropTypes.node),
33-
PropTypes.node,
34-
]).isRequired,
35-
target:PropTypes.string,
29+
href:T.oneOfType([T.string,T.object]).isRequired,
30+
children:T.oneOfType([T.string,T.arrayOf(T.node),T.node]).isRequired,
31+
target:T.string,
3632
}
3733

3834
A.defaultProps={

‎components/AdderCell/index.js‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
*/
66

77
importReactfrom'react'
8-
importPropTypesfrom'prop-types'
8+
importTfrom'prop-types'
99

1010
import{ICON_CMD}from'@config'
1111

12-
import{makeDebugger}from'@utils'
12+
import{buildLog}from'@utils'
1313
import{AddWrapper,AddIcon,AddText}from'./styles'
1414

1515
/* eslint-disable no-unused-vars */
16-
constdebug=makeDebugger('c:AdderCell:index')
16+
constlog=buildLog('c:AdderCell:index')
1717
/* eslint-enable no-unused-vars */
1818

1919
constAdderCell=({ onAdd})=>(
@@ -25,11 +25,11 @@ const AdderCell = ({ onAdd }) => (
2525

2626
AdderCell.propTypes={
2727
// https://www.npmjs.com/package/prop-types
28-
onAdd:PropTypes.func,
28+
onAdd:T.func,
2929
}
3030

3131
AdderCell.defaultProps={
32-
onAdd:debug,
32+
onAdd:log,
3333
}
3434

3535
exportdefaultAdderCell

‎components/AvatarsRow/index.js‎

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@
55
*/
66

77
importReactfrom'react'
8-
importPropTypesfrom'prop-types'
8+
importTfrom'prop-types'
99
importRfrom'ramda'
1010
import{Tooltip}from'antd'
1111

1212
import{ATATARS_LIST_LENGTH}from'config/general'
1313

14-
import{makeDebugger,prettyNum}from'@utils'
14+
import{buildLog,prettyNum}from'@utils'
1515
import{Avatars,AvatarsItem,AvatarsImg,AvatarsMore}from'./styles'
1616

1717
/* eslint-disable no-unused-vars */
18-
constdebug=makeDebugger('c:AvatarsRow:index')
18+
constlog=buildLog('c:AvatarsRow:index')
1919
/* eslint-enable no-unused-vars */
2020

2121
constvalidUser=R.compose(
@@ -61,27 +61,27 @@ const AvatarsRow = ({
6161
}
6262

6363
AvatarsRow.propTypes={
64-
users:PropTypes.arrayOf(
65-
PropTypes.shape({
66-
id:PropTypes.string,
67-
avatar:PropTypes.string,
68-
nickname:PropTypes.string,
69-
extra_id:PropTypes.string,
64+
users:T.arrayOf(
65+
T.shape({
66+
id:T.string,
67+
avatar:T.string,
68+
nickname:T.string,
69+
extra_id:T.string,
7070
})
7171
),
72-
total:PropTypes.number.isRequired,
73-
height:PropTypes.string,
74-
limit:PropTypes.number,
75-
onUserSelect:PropTypes.func,
76-
onTotalSelect:PropTypes.func,
72+
total:T.number.isRequired,
73+
height:T.string,
74+
limit:T.number,
75+
onUserSelect:T.func,
76+
onTotalSelect:T.func,
7777
}
7878

7979
AvatarsRow.defaultProps={
8080
height:'32px',
8181
users:[],
8282
limit:ATATARS_LIST_LENGTH.POSTS,
83-
onUserSelect:debug,
84-
onTotalSelect:debug,
83+
onUserSelect:log,
84+
onTotalSelect:log,
8585
}
8686

8787
exportdefaultAvatarsRow

‎components/BannerCountBrief/index.js‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
*/
66

77
importReactfrom'react'
8-
importPropTypesfrom'prop-types'
8+
importTfrom'prop-types'
99

10-
import{makeDebugger,toPercentNum}from'@utils'
10+
import{buildLog,toPercentNum}from'@utils'
1111

1212
import{
1313
Result,
@@ -18,7 +18,7 @@ import {
1818
}from'./styles'
1919

2020
/* eslint-disable no-unused-vars */
21-
constdebug=makeDebugger('c:BannerCountBrief:index')
21+
constlog=buildLog('c:BannerCountBrief:index')
2222
/* eslint-enable no-unused-vars */
2323

2424
constCountBrief=({ filteredCount, totalCount, thread, unit})=>{
@@ -69,10 +69,10 @@ const BannerCountBrief = ({ filteredCount, totalCount, thread, unit }) => (
6969
)
7070

7171
BannerCountBrief.propTypes={
72-
filteredCount:PropTypes.number,
73-
totalCount:PropTypes.number.isRequired,
74-
unit:PropTypes.string,
75-
thread:PropTypes.string,
72+
filteredCount:T.number,
73+
totalCount:T.number.isRequired,
74+
unit:T.string,
75+
thread:T.string,
7676
}
7777

7878
BannerCountBrief.defaultProps={

‎components/CategoriesCell/index.js‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66

77
importReactfrom'react'
8-
importPropTypesfrom'prop-types'
8+
importTfrom'prop-types'
99
importRfrom'ramda'
1010
import{Icon}from'antd'
1111

@@ -67,9 +67,9 @@ export default CategoriesCell
6767

6868
CategoriesCell.propTypes={
6969
// https://www.npmjs.com/package/prop-types
70-
source:PropTypes.object.isRequired,
71-
onDelete:PropTypes.func.isRequired,
72-
onAdd:PropTypes.func.isRequired,
70+
source:T.object.isRequired,
71+
onDelete:T.func.isRequired,
72+
onAdd:T.func.isRequired,
7373
}
7474

7575
CategoriesCell.defaultProps={

‎components/ColorCell/index.js‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
*/
66

77
importReactfrom'react'
8-
importPropTypesfrom'prop-types'
8+
importTfrom'prop-types'
99

10-
import{makeDebugger}from'@utils'
10+
import{buildLog}from'@utils'
1111

1212
import{ColorCell,ColorDot/* ColorTitle */}from'./styles'
1313
/* eslint-disable no-unused-vars */
14-
constdebug=makeDebugger('c:ColorCell:index')
14+
constlog=buildLog('c:ColorCell:index')
1515
/* eslint-enable no-unused-vars */
1616

1717
constColorCellComponent=({ color})=>{
@@ -25,7 +25,7 @@ const ColorCellComponent = ({ color }) => {
2525

2626
ColorCellComponent.propTypes={
2727
// https://www.npmjs.com/package/prop-types
28-
color:PropTypes.string,
28+
color:T.string,
2929
}
3030

3131
ColorCellComponent.defaultProps={

‎components/CommunityCell/index.js‎

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66

77
importReactfrom'react'
88
importRfrom'ramda'
9-
importPropTypesfrom'prop-types'
9+
importTfrom'prop-types'
1010
importReactTooltipfrom'react-tooltip'
1111

1212
import{ICON_CMD}from'@config'
1313

14-
import{uid,makeDebugger}from'@utils'
14+
import{uid,buildLog}from'@utils'
1515
importAdderCellfrom'../AdderCell'
1616
importCommunitiesLogoListfrom'./CommunitiesLogoList'
1717

@@ -26,7 +26,7 @@ import {
2626
}from'./styles'
2727

2828
/* eslint-disable no-unused-vars */
29-
constdebug=makeDebugger('c:CommunityCell:index')
29+
constlog=buildLog('c:CommunityCell:index')
3030
/* eslint-enable no-unused-vars */
3131

3232
constSingleCommunity=({ community})=>(
@@ -100,23 +100,23 @@ const CommunityCell = props => (
100100
CommunityCell.propTypes={
101101
// https://www.npmjs.com/package/prop-types
102102
/* eslint-disable */
103-
data:PropTypes.shape({
104-
id:PropTypes.string,
105-
logo:PropTypes.string,
106-
title:PropTypes.string,
103+
data:T.shape({
104+
id:T.string,
105+
logo:T.string,
106+
title:T.string,
107107
}),
108108

109-
array:PropTypes.arrayOf(
110-
PropTypes.shape({
111-
logo:PropTypes.string,
112-
title:PropTypes.string,
109+
array:T.arrayOf(
110+
T.shape({
111+
logo:T.string,
112+
title:T.string,
113113
})
114114
),
115-
withSetter:PropTypes.bool,
116-
thread:PropTypes.string,
117-
source:PropTypes.object,
118-
onDelete:PropTypes.func,
119-
onAdd:PropTypes.func,
115+
withSetter:T.bool,
116+
thread:T.string,
117+
source:T.object,
118+
onDelete:T.func,
119+
onAdd:T.func,
120120
/* eslint-enable */
121121
}
122122

@@ -126,8 +126,8 @@ CommunityCell.defaultProps = {
126126
thread:'POST',
127127
withSetter:false,
128128
source:{},
129-
onDelete:debug,
130-
onAdd:debug,
129+
onDelete:log,
130+
onAdd:log,
131131
}
132132

133133
exportdefaultCommunityCell

‎components/CommunityMatrix/index.js‎

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66

77
importReactfrom'react'
88
importRfrom'ramda'
9-
importPropTypesfrom'prop-types'
9+
importTfrom'prop-types'
1010
importReactTooltipfrom'react-tooltip'
1111

1212
import{ICON_CMD}from'@config'
1313

14-
import{makeDebugger,uid}from'@utils'
14+
import{buildLog,uid}from'@utils'
1515
import{
1616
MatrixWrapper,
1717
CommunityLogo,
@@ -20,7 +20,7 @@ import {
2020
}from'./styles'
2121

2222
/* eslint-disable no-unused-vars */
23-
constdebug=makeDebugger('c:CommunityMatrix:index')
23+
constlog=buildLog('c:CommunityMatrix:index')
2424
/* eslint-enable no-unused-vars */
2525

2626
consttooltipOffset=JSON.stringify({top:5,right:-5})
@@ -93,19 +93,19 @@ class CommunityMatrix extends React.Component {
9393

9494
CommunityMatrix.propTypes={
9595
// https://www.npmjs.com/package/prop-types
96-
data:PropTypes.shape({
96+
data:T.shape({
9797
// TODO add shape
98-
entries:PropTypes.array.isRequired,
99-
pageNumber:PropTypes.number.isRequired,
100-
pageSize:PropTypes.number.isRequired,
101-
totalCount:PropTypes.number.isRequired,
98+
entries:T.array.isRequired,
99+
pageNumber:T.number.isRequired,
100+
pageSize:T.number.isRequired,
101+
totalCount:T.number.isRequired,
102102
}),
103-
array:PropTypes.array,
104-
onSelect:PropTypes.func,
105-
onAddOnSelect:PropTypes.func,
106-
activeRaw:PropTypes.string,
107-
lens:PropTypes.arrayOf(PropTypes.string),
108-
hasAddon:PropTypes.bool,
103+
array:T.array,
104+
onSelect:T.func,
105+
onAddOnSelect:T.func,
106+
activeRaw:T.string,
107+
lens:T.arrayOf(T.string),
108+
hasAddon:T.bool,
109109
}
110110

111111
CommunityMatrix.defaultProps={
@@ -116,8 +116,8 @@ CommunityMatrix.defaultProps = {
116116
totalCount:0,
117117
},
118118
array:[],
119-
onSelect:debug,
120-
onAddOnSelect:debug,
119+
onSelect:log,
120+
onAddOnSelect:log,
121121
lens:[],
122122
hasAddon:true,
123123
activeRaw:'',

‎components/ContentFilter/index.js‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
*/
66

77
importReactfrom'react'
8-
importPropTypesfrom'prop-types'
8+
importTfrom'prop-types'
99
import{Button,Row,Col,Tag}from'antd'
1010
import{ICON_CMD}from'@config'
11-
import{makeDebugger,isEmptyValue}from'@utils'
11+
import{buildLog,isEmptyValue}from'@utils'
1212
importPopoverfrom'../Popover'
1313

1414
import{
@@ -21,7 +21,7 @@ import {
2121
}from'./styles'
2222

2323
/* eslint-disable no-unused-vars */
24-
constdebug=makeDebugger('c:ContentFilter:index')
24+
constlog=buildLog('c:ContentFilter:index')
2525
/* eslint-enable no-unused-vars */
2626

2727
constfilterDict={
@@ -163,11 +163,11 @@ const ContentFilter = ({ onSelect, activeWhen, activeSort, activeLength }) => (
163163

164164
ContentFilter.propTypes={
165165
// https://www.npmjs.com/package/prop-types
166-
activeWhen:PropTypes.string,
167-
activeSort:PropTypes.string,
168-
activeLength:PropTypes.string,
166+
activeWhen:T.string,
167+
activeSort:T.string,
168+
activeLength:T.string,
169169

170-
onSelect:PropTypes.func.isRequired,
170+
onSelect:T.func.isRequired,
171171
}
172172

173173
ContentFilter.defaultProps={

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp