Skip to content

Commit c04d20b

Browse files
renovate[bot]sxzz
andauthored
chore(deps): update dependency @sxzz/prettier-config to v2 (#74)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: 三咲智子 Kevin Deng <[email protected]>
1 parent 8780602 commit c04d20b

File tree

14 files changed

+45
-45
lines changed

14 files changed

+45
-45
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"devDependencies": {
4545
"@sxzz/eslint-config-prettier": "^2.4.6",
4646
"@sxzz/eslint-config-ts": "^2.4.6",
47-
"@sxzz/prettier-config": "^1.0.4",
47+
"@sxzz/prettier-config": "^2.0.0",
4848
"@types/node": "^20.9.2",
4949
"bumpp": "^9.2.0",
5050
"date-fns": "^2.30.0",

pnpm-lock.yaml

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/command/like-rank.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export const likeRanking = async ({ top, count }: LikeRankOptions) => {
5959
.map(async ({ user, count }) => {
6060
const ranking = getRanking(count)
6161
let text = `${renderRanking(ranking)} ${displayUser(
62-
user
62+
user,
6363
)} 点赞 ${ui.colors.cyan(`${count}`)} 次,${(
6464
(count / posts.length) *
6565
100
@@ -71,7 +71,7 @@ export const likeRanking = async ({ top, count }: LikeRankOptions) => {
7171
}\n${text}\n${divider}`
7272
}
7373
return text
74-
})
74+
}),
7575
)
7676

7777
spinner.stop()

src/command/msg.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const showNotifications = async (opts: NotificationOptions) => {
3737
`Loading notifications... (page ${page}, ${+(
3838
(data.length / count) *
3939
100
40-
).toFixed(2)}%)`
40+
).toFixed(2)}%)`,
4141
)
4242
return true
4343
},
@@ -57,8 +57,8 @@ const showNotifications = async (opts: NotificationOptions) => {
5757
const texts = (
5858
await Promise.all(
5959
notifications.map((n) =>
60-
renderNotification(n, opts).then((result) => [...result, divider])
61-
)
60+
renderNotification(n, opts).then((result) => [...result, divider]),
61+
),
6262
).finally(() => spinner?.stop())
6363
).flat()
6464
texts.unshift(divider)
@@ -71,7 +71,7 @@ const EMPTY_PLACEHOLDER = '(EMPTY)'
7171

7272
async function renderNotification(
7373
n: Entity.Notification,
74-
{ avatar, image }: NotificationOptions
74+
{ avatar, image }: NotificationOptions,
7575
): Promise<string[]> {
7676
const users = n.actionItem?.users ?? []
7777
let usersText = displayUsers(users)
@@ -179,6 +179,6 @@ async function renderNotification(
179179
const warnUnknownType = (n: Entity.Notification) => {
180180
const info = [n.type, n.actionType, n.actionItem.type].join('||')
181181
ui.logger.warning(
182-
`Unknown notification: ${info}. Please send it to developer, thanks!`
182+
`Unknown notification: ${info}. Please send it to developer, thanks!`,
183183
)
184184
}

src/command/post/create.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export const createPost = async ({ content, topic }: CreateOptions) => {
3636

3737
const draftFile = path.resolve(
3838
draftDir,
39-
`${format(new Date(), 'yyyy-MM-dd-HH-mm-ss')}.txt`
39+
`${format(new Date(), 'yyyy-MM-dd-HH-mm-ss')}.txt`,
4040
)
4141
spawnSync('vim', [draftFile], { stdio: 'inherit' })
4242

@@ -76,7 +76,7 @@ export const createPost = async ({ content, topic }: CreateOptions) => {
7676
})
7777
.catch((err) => ui.logger.fatal(err))
7878
ui.logger.success(
79-
`${ui.colors.bold(displayConfigUser(user))} posted successfully!`
79+
`${ui.colors.bold(displayConfigUser(user))} posted successfully!`,
8080
)
8181
}
8282
}

src/command/post/feed.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const viewFeeds = async (opts: FeedOptions) => {
4444
}
4545

4646
async function renderPost(
47-
p: JikePostWithDetail | ({ actionTime: string } & Entity.PersonalUpdate)
47+
p: JikePostWithDetail | ({ actionTime: string } & Entity.PersonalUpdate),
4848
) {
4949
const texts: string[] = []
5050
if (p.type === 'PERSONAL_UPDATE') {
@@ -56,12 +56,12 @@ async function renderPost(
5656
// @ts-expect-error
5757
(await displayImage(p.live.picture.picUrl)).result,
5858
// @ts-expect-error
59-
p.live.title
59+
p.live.title,
6060
)
6161
break
6262
case 'USER_FOLLOW':
6363
texts.push(
64-
`${displayUsers(p.users)} 关注了 ${displayUsers(p.targetUsers)}`
64+
`${displayUsers(p.users)} 关注了 ${displayUsers(p.targetUsers)}`,
6565
)
6666
break
6767
default:
@@ -71,30 +71,30 @@ async function renderPost(
7171
const detail = p.detail as Entity.OriginalPost
7272
const link = isMacOS
7373
? ui.colors.gray(
74-
ui.colors.underline(`jike://page.jk/originalPost/${p.id}`)
74+
ui.colors.underline(`jike://page.jk/originalPost/${p.id}`),
7575
)
7676
: ''
7777
texts.push(
7878
(await displayImage(detail.user.avatarImage.thumbnailUrl, 3)).result,
7979
`${displayUser(detail.user)}${
8080
detail.topic ? ` [${detail.topic.content}]` : ''
8181
}: ${link}`,
82-
detail.content
82+
detail.content,
8383
)
8484
if (detail.pictures && detail.pictures.length > 0) {
8585
const images = await Promise.all(
8686
detail.pictures.map((p) =>
87-
displayImage(p.middlePicUrl).then(({ result }) => `${result}\n`)
88-
)
87+
displayImage(p.middlePicUrl).then(({ result }) => `${result}\n`),
88+
),
8989
)
9090
texts.push(...images)
9191
}
9292
if (detail.linkInfo) {
9393
texts.push(
9494
(await displayImage(detail.linkInfo.pictureUrl)).result,
9595
`分享链接 [${detail.linkInfo.title}](${ui.colors.blue(
96-
ui.colors.underline(detail.linkInfo.linkUrl)
97-
)})`
96+
ui.colors.underline(detail.linkInfo.linkUrl),
97+
)})`,
9898
)
9999
}
100100
} else {

src/command/post/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Example call:
1313
$ jike-cli post new --content="hello world"
1414
$ jike-cli post feed
1515
$ jike-cli post list
16-
`
16+
`,
1717
)
1818
.usage('<command> [flags]')
1919
.addCommand(create)

src/command/post/list.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,30 +48,30 @@ async function renderPost(p: JikePostWithDetail) {
4848
if (detail.type === 'ORIGINAL_POST') {
4949
const link = isMacOS
5050
? ui.colors.gray(
51-
ui.colors.underline(`jike://page.jk/originalPost/${p.id}`)
51+
ui.colors.underline(`jike://page.jk/originalPost/${p.id}`),
5252
)
5353
: ''
5454
texts.push(
5555
(await displayImage(detail.user.avatarImage.thumbnailUrl, 3)).result,
5656
`${displayUser(detail.user)}${
5757
detail.topic ? ` [${detail.topic.content}]` : ''
5858
}: ${link}`,
59-
detail.content
59+
detail.content,
6060
)
6161
if (detail.pictures && detail.pictures.length > 0) {
6262
const images = await Promise.all(
6363
detail.pictures.map((p) =>
64-
displayImage(p.middlePicUrl).then(({ result }) => result)
65-
)
64+
displayImage(p.middlePicUrl).then(({ result }) => result),
65+
),
6666
)
6767
texts.push(...images)
6868
}
6969
if (detail.linkInfo) {
7070
texts.push(
7171
(await displayImage(detail.linkInfo.pictureUrl)).result,
7272
`分享链接 [${detail.linkInfo.title}](${ui.colors.blue(
73-
ui.colors.underline(detail.linkInfo.linkUrl)
74-
)})`
73+
ui.colors.underline(detail.linkInfo.linkUrl),
74+
)})`,
7575
)
7676
}
7777
} else {

src/command/user/followed.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export const isFollowed = async (following?: string, follower?: string) => {
3535

3636
const isFollowed = await getUser(following).isFollowing(
3737
getUser(follower),
38-
mode
38+
mode,
3939
)
4040

4141
ui.logger.info(isFollowed ? 'Followed!' : 'Not followed.')

src/command/user/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Example call:
2323
$ jike-cli user info
2424
$ jike-cli user alias -u <user> <alias>
2525
$ jike-cli user followed -f 5C505995-681E-4C1E-AD4A-1CC683627B6E
26-
`
26+
`,
2727
)
2828
.usage('<command> [flags]')
2929
.addCommand(renew)

0 commit comments

Comments
 (0)