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.

Commitd8999e9

Browse files
committed
chore(eslint): fix warnings
1 parent26acfb1 commitd8999e9

File tree

94 files changed

+1194
-2232
lines changed

Some content is hidden

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

94 files changed

+1194
-2232
lines changed

‎.eslintrc.js‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,7 @@ module.exports = {
3030
rules:{
3131
'react/jsx-one-expression-per-line':0,
3232
'operator-linebreak':0,
33+
indent:0,
34+
'function-paren-newline':0,
3335
},
3436
}

‎.huskyrc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"hooks": {
3-
"pre-commit": "pretty-quick --staged",
3+
"pre-commit": "pretty-quick --staged && npm run lint:staged",
44
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
55
}
66
}

‎src/components/ArticleActionsPanel/EditOption.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { Option, OptionIcon, OptionTitle } from './styles'
99

1010
constEditOption=({ thread, onEdit})=>(
1111
<React.Fragment>
12-
<OptiononClick={onEdit.bind(this,thread)}>
12+
<OptiononClick={()=>onEdit(thread)}>
1313
<OptionIconsrc={`${ICON_CMD}/edit.svg`}/>
1414
{thread===THREAD.REPO ?(
1515
<OptionTitle>同步仓库信息</OptionTitle>

‎src/components/ArticleActionsPanel/PinOption.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ import { Option, OptionIcon, OptionTitle } from './styles'
99
constPinOption=({ data, thread, onPin, onUndoPin})=>(
1010
<React.Fragment>
1111
{data.pin ?(
12-
<OptiononClick={onUndoPin.bind(this,thread)}>
12+
<OptiononClick={()=>onUndoPin(thread)}>
1313
<OptionIconsrc={`${ICON_CMD}/pin.svg`}reverse/>
1414
<OptionTitle>取消置顶</OptionTitle>
1515
</Option>
1616
) :(
17-
<OptiononClick={onPin.bind(this,thread)}>
17+
<OptiononClick={()=>onPin(thread)}>
1818
<OptionIconsrc={`${ICON_CMD}/pin.svg`}/>
1919
<OptionTitle>置顶显示</OptionTitle>
2020
</Option>

‎src/components/BuyMeChuanChuan/ChuanSelector.js‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,19 @@ const ChuanSelector = ({ active, onSelect }) => (
1515

1616
<Selectors>
1717
<By>X</By>
18-
<Circleactive={active===1}onClick={onSelect.bind(this,1)}>
18+
<Circleactive={active===1}onClick={()=>onSelect(1)}>
1919
1
2020
</Circle>
21-
<Circleactive={active===5}onClick={onSelect.bind(this,5)}>
21+
<Circleactive={active===5}onClick={()=>onSelect(5)}>
2222
5
2323
</Circle>
24-
<Circleactive={active===10}onClick={onSelect.bind(this,10)}>
24+
<Circleactive={active===10}onClick={()=>onSelect(10)}>
2525
10
2626
</Circle>
27-
<Circleactive={active===50}onClick={onSelect.bind(this,50)}>
27+
<Circleactive={active===50}onClick={()=>onSelect(50)}>
2828
50
2929
</Circle>
30-
<Circleactive={active===100}onClick={onSelect.bind(this,100)}>
30+
<Circleactive={active===100}onClick={()=>onSelect(100)}>
3131
100
3232
</Circle>
3333
</Selectors>

‎src/components/BuyMeChuanChuan/PaymentFooter.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const PaymentFooter = ({ num, onPay }) => (
2525
<PaymentIconsrc={`${ICON_CMD}/weichat-color.svg`}/> 微信支付
2626
</Weixin>
2727
</PayDesc>
28-
<Buttontype="red"onClick={onPay.bind(this,num*10.24)}>
28+
<Buttontype="red"onClick={()=>onPay(num*10.24)}>
2929
资助<MoneyNum>{num*10.24}</MoneyNum>
3030
</Button>
3131
</Wrapper>

‎src/components/CommunityStatesPad/SubscribedTitle.js‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const SubscribedBtn = ({ community, onUndoSubscribe }) => {
2525
</PopoverInfo>
2626
}
2727
>
28-
<NumberTitleonClick={onUndoSubscribe.bind(this,community)}small>
28+
<NumberTitleonClick={()=>onUndoSubscribe(community)}small>
2929
已加入
3030
</NumberTitle>
3131
</Tooltip>
@@ -46,9 +46,7 @@ const SubscribedTitle = ({ community, onSubscribe, onUndoSubscribe }) => (
4646
</PopoverInfo>
4747
}
4848
>
49-
<NumberTitleonClick={onSubscribe.bind(this,community)}>
50-
加入
51-
</NumberTitle>
49+
<NumberTitleonClick={()=>onSubscribe(community)}>加入</NumberTitle>
5250
</Tooltip>
5351
)}
5452
</React.Fragment>

‎src/components/ContentFilter/LengthFilter.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ const LengthFilter = ({ activeFilter, onSelect }) => (
2121
<LabelDivider/>
2222
<SelectItem
2323
active={activeFilter.length===FILTER.MOST_WORDS}
24-
onClick={onSelect.bind(this,{length:FILTER.MOST_WORDS})}
24+
onClick={()=>onSelect({length:FILTER.MOST_WORDS})}
2525
>
2626
字数最多
2727
</SelectItem>
2828
<SelectItem
2929
active={activeFilter.length===FILTER.LEAST_WORDS}
30-
onClick={onSelect.bind(this,{length:FILTER.LEAST_WORDS})}
30+
onClick={()=>onSelect({length:FILTER.LEAST_WORDS})}
3131
>
3232
字数最少
3333
</SelectItem>

‎src/components/ContentFilter/RepoSortFilter.js‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,39 +24,39 @@ const RepoSortFilter = ({ activeFilter, onSelect }) => (
2424
<LeftAlignWrapperoffset="10px">
2525
<SelectItem
2626
active={activeFilter.sort===FILTER.MOST_GITHUB_STAR}
27-
onClick={onSelect.bind(this,{sort:FILTER.MOST_GITHUB_STAR})}
27+
onClick={()=>onSelect({sort:FILTER.MOST_GITHUB_STAR})}
2828
>
2929
最多Star
3030
</SelectItem>
3131
<SelectItem
3232
active={activeFilter.sort===FILTER.MOST_GITHUB_FORK}
33-
onClick={onSelect.bind(this,{sort:FILTER.MOST_GITHUB_FORK})}
33+
onClick={()=>onSelect({sort:FILTER.MOST_GITHUB_FORK})}
3434
>
3535
最多Fork
3636
</SelectItem>
3737

3838
<SelectItem
3939
active={activeFilter.sort===FILTER.MOST_GITHUB_WATCH}
40-
onClick={onSelect.bind(this,{sort:FILTER.MOST_GITHUB_WATCH})}
40+
onClick={()=>onSelect({sort:FILTER.MOST_GITHUB_WATCH})}
4141
>
4242
最多Watch
4343
</SelectItem>
4444

4545
<SelectItem
4646
active={activeFilter.sort===FILTER.MOST_VIEWS}
47-
onClick={onSelect.bind(this,{sort:FILTER.MOST_VIEWS})}
47+
onClick={()=>onSelect({sort:FILTER.MOST_VIEWS})}
4848
>
4949
最多浏览
5050
</SelectItem>
5151
<SelectItem
5252
active={activeFilter.sort===FILTER.MOST_FAVORITES}
53-
onClick={onSelect.bind(this,{sort:FILTER.MOST_FAVORITES})}
53+
onClick={()=>onSelect({sort:FILTER.MOST_FAVORITES})}
5454
>
5555
最多收藏
5656
</SelectItem>
5757
<SelectItem
5858
active={activeFilter.sort===FILTER.MOST_COMMENTS}
59-
onClick={onSelect.bind(this,{sort:FILTER.MOST_COMMENTS})}
59+
onClick={()=>onSelect({sort:FILTER.MOST_COMMENTS})}
6060
>
6161
最多评论
6262
</SelectItem>

‎src/components/ContentFilter/SortFilter.js‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,25 +22,25 @@ const SortFilter = ({ activeFilter, onSelect }) => (
2222

2323
<SelectItem
2424
active={activeFilter.sort===FILTER.MOST_VIEWS}
25-
onClick={onSelect.bind(this,{sort:FILTER.MOST_VIEWS})}
25+
onClick={()=>onSelect({sort:FILTER.MOST_VIEWS})}
2626
>
2727
最多浏览
2828
</SelectItem>
2929
<SelectItem
3030
active={activeFilter.sort===FILTER.MOST_STARS}
31-
onClick={onSelect.bind(this,{sort:FILTER.MOST_STARS})}
31+
onClick={()=>onSelect({sort:FILTER.MOST_STARS})}
3232
>
3333
最多点赞
3434
</SelectItem>
3535
<SelectItem
3636
active={activeFilter.sort===FILTER.MOST_FAVORITES}
37-
onClick={onSelect.bind(this,{sort:FILTER.MOST_FAVORITES})}
37+
onClick={()=>onSelect({sort:FILTER.MOST_FAVORITES})}
3838
>
3939
最多收藏
4040
</SelectItem>
4141
<SelectItem
4242
active={activeFilter.sort===FILTER.MOST_COMMENTS}
43-
onClick={onSelect.bind(this,{sort:FILTER.MOST_COMMENTS})}
43+
onClick={()=>onSelect({sort:FILTER.MOST_COMMENTS})}
4444
>
4545
最多评论
4646
</SelectItem>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp