Skip to content

Commit 53f8fd4

Browse files
committed
fix: 🐛 lint
1 parent d5f887e commit 53f8fd4

8 files changed

+16
-16
lines changed

src/agents/cache-agent.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class CacheAgent {
6060
*/
6161
const lruOptions = (maxSize = 100): QuickLruOptions<any, any> => ({
6262
maxAge: 15 * 60 * 1000 * 1000, // 15 minutes
63-
maxSize: maxSize,
63+
maxSize,
6464
})
6565

6666
this.contact = new QuickLru<string, ContactPayload>(lruOptions(

src/mixins/contact-mixin.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ const contactMixin = <MixinBase extends CacheMixin & typeof PuppetSkeleton>(mixi
100100
try {
101101
// make sure the contact id has valid payload
102102
await this.contactPayload(query.id)
103-
return [query.id]
103+
return [ query.id ]
104104
} catch (e) {
105105
log.verbose('PuppetContactMixin', 'contactSearch() payload not found for id "%s"', query.id)
106106
await this.contactPayloadDirty(query.id)

src/mixins/message-mixin.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ const messageMixin = <MinxinBase extends typeof PuppetSkeleton & CacheMixin>(bas
147147

148148
messageList (): string[] {
149149
log.verbose('PuppetMessageMixin', 'messageList()')
150-
return [...this.cache.message.keys()]
150+
return [ ...this.cache.message.keys() ]
151151
}
152152

153153
async messageSearch (
@@ -162,7 +162,7 @@ const messageMixin = <MinxinBase extends typeof PuppetSkeleton & CacheMixin>(bas
162162
try {
163163
// make sure the room id has valid payload
164164
await this.messagePayload(query.id)
165-
return [query.id]
165+
return [ query.id ]
166166
} catch (e) {
167167
log.verbose('PuppetMessageMixin', 'messageSearch() payload not found for id "%s"', query.id)
168168
return []

src/mixins/post-mixin.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ const postMixin = <MinxinBase extends typeof PuppetSkeleton & CacheMixin>(baseMi
9595
*/
9696
postList (): string[] {
9797
log.verbose('PuppetPostMixin', 'postList()')
98-
return [...this.cache.post.keys()]
98+
return [ ...this.cache.post.keys() ]
9999
}
100100

101101
async postPayloadDirty (

src/mixins/room-member-mixin.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ const roomMemberMixin = <MixinBase extends typeof PuppetSkeleton & ContactMixin>
5252
*/
5353
if (typeof query === 'symbol') {
5454
if (query === YOU) {
55-
return [this.currentUserId]
55+
return [ this.currentUserId ]
5656
}
5757
/**
5858
* Huan(202111): We use `symbol` instead of `uniq symbol` in the method argument

src/mixins/room-mixin.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ const roomMixin = <MixinBase extends typeof PuppetSkeleton & ContactMixin & Room
7474
try {
7575
// make sure the room id has valid payload
7676
await this.roomPayload(query.id)
77-
return [query.id]
77+
return [ query.id ]
7878
} catch (e) {
7979
log.verbose('PuppetRoomMixin', 'roomSearch() payload not found for id "%s"', query.id)
8080
await this.roomPayloadDirty(query.id)

src/puppet/puppet-abstract.spec.ts

+8-8
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ test('contactQueryFilterFunction()', async t => {
8383

8484
void t.test('filter name by regex', async t => {
8585
const QUERY = { name: REGEX_VALUE }
86-
const ID_LIST = ['id1', 'id3']
86+
const ID_LIST = [ 'id1', 'id3' ]
8787

8888
const func = puppet.contactQueryFilterFactory(QUERY)
8989
const idList = PAYLOAD_LIST.filter(func).map(payload => payload.id)
@@ -92,7 +92,7 @@ test('contactQueryFilterFunction()', async t => {
9292

9393
void t.test('filter name by text', async t => {
9494
const QUERY = { name: TEXT_VALUE }
95-
const ID_LIST = ['id2', 'id4']
95+
const ID_LIST = [ 'id2', 'id4' ]
9696

9797
const func = puppet.contactQueryFilterFactory(QUERY)
9898
const idList = PAYLOAD_LIST.filter(func).map(payload => payload.id)
@@ -101,7 +101,7 @@ test('contactQueryFilterFunction()', async t => {
101101

102102
void t.test('filter alias by regex', async t => {
103103
const QUERY = { alias: REGEX_VALUE }
104-
const ID_LIST = ['id2', 'id4']
104+
const ID_LIST = [ 'id2', 'id4' ]
105105

106106
const func = puppet.contactQueryFilterFactory(QUERY)
107107
const idList = PAYLOAD_LIST.filter(func).map(payload => payload.id)
@@ -110,7 +110,7 @@ test('contactQueryFilterFunction()', async t => {
110110

111111
void t.test('filter alias by text', async t => {
112112
const QUERY = { alias: TEXT_VALUE }
113-
const ID_LIST = ['id1', 'id3']
113+
const ID_LIST = [ 'id1', 'id3' ]
114114

115115
const func = puppet.contactQueryFilterFactory(QUERY)
116116
const idList = PAYLOAD_LIST.filter(func).map(payload => payload.id)
@@ -119,7 +119,7 @@ test('contactQueryFilterFunction()', async t => {
119119

120120
void t.test('filter contact existing id', async t => {
121121
const QUERY = { id: 'id1' }
122-
const ID_LIST = ['id1']
122+
const ID_LIST = [ 'id1' ]
123123

124124
const func = puppet.contactQueryFilterFactory(QUERY)
125125
const idList = PAYLOAD_LIST.filter(func).map(payload => payload.id)
@@ -186,7 +186,7 @@ test('roomQueryFilterFunction()', async t => {
186186

187187
void t.test('filter name by regex', async t => {
188188
const QUERY = { topic: REGEX_VALUE }
189-
const ID_LIST = ['id2', 'id4']
189+
const ID_LIST = [ 'id2', 'id4' ]
190190

191191
const func = puppet.roomQueryFilterFactory(QUERY)
192192
const idList = PAYLOAD_LIST.filter(func).map(payload => payload.id)
@@ -195,7 +195,7 @@ test('roomQueryFilterFunction()', async t => {
195195

196196
void t.test('filter name by text', async t => {
197197
const QUERY = { topic: TEXT_VALUE }
198-
const ID_LIST = ['id1', 'id3']
198+
const ID_LIST = [ 'id1', 'id3' ]
199199

200200
const func = puppet.roomQueryFilterFactory(QUERY)
201201
const idList = PAYLOAD_LIST.filter(func).map(payload => payload.id)
@@ -204,7 +204,7 @@ test('roomQueryFilterFunction()', async t => {
204204

205205
void t.test('filter name by existing id', async t => {
206206
const QUERY = { id: 'id4' }
207-
const ID_LIST = ['id4']
207+
const ID_LIST = [ 'id4' ]
208208

209209
const func = puppet.roomQueryFilterFactory(QUERY)
210210
const idList = PAYLOAD_LIST.filter(func).map(payload => payload.id)

src/puppet/puppet-skeleton.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ test('emit(error, ...) with GError', async t => {
3636
'',
3737
'foo',
3838
[],
39-
[1],
39+
[ 1 ],
4040
{},
4141
{ foo: 'bar' },
4242
new Error(),

0 commit comments

Comments
 (0)