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 8, 2022. It is now read-only.

Commit26acfb1

Browse files
committed
chore(prettier): format with new rules
1 parent5ac3a45 commit26acfb1

File tree

381 files changed

+963
-956
lines changed

Some content is hidden

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

381 files changed

+963
-956
lines changed

‎.eslintrc.js‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,8 @@ module.exports = {
2727
},
2828
},
2929
},
30-
rules:{},
30+
rules:{
31+
'react/jsx-one-expression-per-line':0,
32+
'operator-linebreak':0,
33+
},
3134
}

‎src/components/AlertBar/styles/index.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import styled from 'styled-components'
33
// import Img from '@/Img'
44
// import { theme } from '@/utils'
55

6-
exportconstWrapper=styled.div.attrs(props=>({
6+
exportconstWrapper=styled.div.attrs((props)=>({
77
'data-testid':props.testid,
88
}))`
99
font-size: 14px;

‎src/components/ArticleActionsPanel/RefineOption.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ import { Option, OptionIcon, OptionTitle } from './styles'
1010
constRefineOption=({ data, thread, onSetRefined, onUnsetRefined})=>(
1111
<React.Fragment>
1212
{contains('refined',pluck('title',data.tags)) ?(
13-
<OptiononClick={onUnsetRefined.bind(this,thread)}>
13+
<OptiononClick={()=>onUnsetRefined(thread)}>
1414
<OptionIconsrc={`${ICON_CMD}/diamond_frame.svg`}/>
1515
<OptionTitle>取消精华</OptionTitle>
1616
</Option>
1717
) :(
18-
<OptiononClick={onSetRefined.bind(this,thread)}>
18+
<OptiononClick={()=>onSetRefined(thread)}>
1919
<OptionIconsrc={`${ICON_CMD}/diamond_frame.svg`}/>
2020
<OptionTitle>设为精华</OptionTitle>
2121
</Option>
@@ -29,7 +29,7 @@ RefineOption.propTypes = {
2929
T.shape({
3030
id:T.string,
3131
title:T.string,
32-
})
32+
}),
3333
),
3434
}).isRequired,
3535
thread:T.string.isRequired,

‎src/components/ArticleActionsPanel/index.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ ArticleActionsPanel.propTypes = {
9393
title:T.string,
9494
color:T.string,
9595
raw:T.string,
96-
})
96+
}),
9797
),
9898
}).isRequired,
9999
communityRaw:T.string.isRequired,

‎src/components/ArticleEditToolbar/CopyrightSelector.js‎

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,29 +33,26 @@ const FullOptions = [
3333
},
3434
]
3535

36-
constgetOptions=thread=>{
36+
constgetOptions=(thread)=>{
3737
switch(thread){
3838
caseTHREAD.JOB:
39-
returnreject(o=>o.value==='translate',FullOptions)
39+
returnreject((o)=>o.value==='translate',FullOptions)
4040

4141
caseTHREAD.RADAR:
42-
returnreject(o=>o.value==='original',FullOptions)
42+
returnreject((o)=>o.value==='original',FullOptions)
4343

4444
default:
4545
returnFullOptions
4646
}
4747
}
4848

49-
constgetCpTitle=cptype=>
49+
constgetCpTitle=(cptype)=>
5050
path(['title'],find(propEq('value',cptype),FullOptions))
5151

5252
constCopyrightContent=({ active, thread, onCopyrightChange})=>(
5353
<Wrapper>
54-
{getOptions(thread).map(opt=>(
55-
<Selector
56-
key={opt.value}
57-
onClick={onCopyrightChange.bind(this,opt.value)}
58-
>
54+
{getOptions(thread).map((opt)=>(
55+
<Selectorkey={opt.value}onClick={()=>onCopyrightChange(opt.value)}>
5956
<CheckText>{opt.title}</CheckText>
6057
<CheckIcon
6158
src={`${ICON_CMD}/check2.svg`}

‎src/components/AvatarsRow/index.js‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ const validUser = compose(not, isNil)
3030

3131
constgetUniqueArray=(arr,comp)=>{
3232
constunique=arr
33-
.map(e=>e[comp])
33+
.map((e)=>e[comp])
3434

3535
// store the keys of the unique objects
3636
.map((e,i,final)=>final.indexOf(e)===i&&i)
3737

3838
// eliminate the dead keys & store unique objects
39-
.filter(e=>arr[e])
40-
.map(e=>arr[e])
39+
.filter((e)=>arr[e])
40+
.map((e)=>arr[e])
4141

4242
returnunique
4343
}
@@ -53,11 +53,11 @@ const AvatarsRow = ({
5353
reverse:isReverse,
5454
})=>{
5555
consthandleUserSelect=useCallback(
56-
e=>{
56+
(e)=>{
5757
constuser=s2o(e.target.dataset.user)
5858
onUserSelect(user)
5959
},
60-
[onUserSelect]
60+
[onUserSelect],
6161
)
6262

6363
if(users.length===0){
@@ -80,7 +80,7 @@ const AvatarsRow = ({
8080
/>
8181
)}
8282

83-
{slice(0,limit,sortedUsers).map(user=>(
83+
{slice(0,limit,sortedUsers).map((user)=>(
8484
<AvatarsItemkey={user.id}>
8585
<Tooltipcontent={user.nickname}duration={0}>
8686
<AvatarsImg
@@ -103,7 +103,7 @@ AvatarsRow.propTypes = {
103103
avatar:T.string,
104104
nickname:T.string,
105105
extra_id:T.string,
106-
})
106+
}),
107107
),
108108
total:T.number.isRequired,
109109
height:T.string,

‎src/components/AvatarsRow/styles/index.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export const AvatarsImg = styled(Img)`
5858
text-align: center;
5959
`
6060

61-
constmoreTextSize=total=>{
61+
constmoreTextSize=(total)=>{
6262
if(total<99)return'14px'
6363
if(total>=100&&total<=999)return'12px'
6464
return'10px'

‎src/components/Buttons/OrButton/HorizontalButton.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ HorizontalButton.propTypes = {
4040
T.shape({
4141
key:T.string,
4242
title:T.string,
43-
})
43+
}),
4444
),
4545
}
4646

‎src/components/Buttons/OrButton/VerticalButton.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ VerticalButton.propTypes = {
3838
T.shape({
3939
key:T.string,
4040
title:T.string,
41-
})
41+
}),
4242
),
4343
}
4444

‎src/components/Buttons/OrButton/index.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ OrButton.propTypes = {
2323
T.shape({
2424
key:T.string,
2525
title:T.string,
26-
})
26+
}),
2727
),
2828
}
2929

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp