Skip to content

Commit 6ed62e4

Browse files
committed
chore: fix lint
1 parent 5709ba8 commit 6ed62e4

26 files changed

+80
-68
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ import { setApiConfig } from 'jike-sdk'
159159
[API Reference](https://jike-sdk.sxzz.moe/)
160160

161161
```ts
162-
import { ApiClient, api, setAccessToken, setApiConfig } from 'jike-sdk'
162+
import { api, ApiClient, setAccessToken, setApiConfig } from 'jike-sdk'
163163

164164
// 自行在 GitHub 搜索「jike endpoint」探索配置
165165
const apiConfig = {

eslint.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
// @ts-check
12
import { sxzz } from '@sxzz/eslint-config'
23

3-
export default sxzz([
4+
export default sxzz().append([
45
{
56
ignores: ['playground/**', 'docs/**', 'tests/deno/**'],
67
},

src/api-client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { type Api, api } from './api'
2-
import { type ApiConfig, setApiConfig } from './request'
1+
import { api, type Api } from './api'
2+
import { setApiConfig, type ApiConfig } from './request'
33

44
/**
55
* API 客户端

src/api/comments.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import { request, toResponse } from '../request'
2+
import type { Comments } from '../types/api-responses'
23
import type { PostTypeRaw } from '../types/entity'
34
import type {
45
AddCommentOption,
56
ListCommentMoreKey,
67
ListPrimaryCommentOption,
78
PaginationOption,
89
} from '../types/options'
9-
import type { Comments } from '../types/api-responses'
1010

1111
export const add = <T = Comments.AddResponse>(
1212
targetType: PostTypeRaw,

src/api/index.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
import * as users from './users'
2-
import * as userRelation from './user-relation'
1+
import * as comments from './comments'
2+
import * as mediaMeta from './media-meta'
3+
import * as notifications from './notifications'
4+
import * as personalUpdate from './personal-update'
35
import * as posts from './posts'
46
import * as recommendFeed from './recommend-feed'
5-
import * as personalUpdate from './personal-update'
6-
import * as notifications from './notifications'
7-
import * as comments from './comments'
8-
import * as upload from './upload'
97
import * as stories from './stories'
10-
import * as mediaMeta from './media-meta'
118
import * as topics from './topics'
9+
import * as upload from './upload'
10+
import * as userRelation from './user-relation'
11+
import * as users from './users'
1212

1313
/**
1414
* API

src/api/media-meta.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { request, toResponse } from '../request'
2-
import type { LiteralUnion } from '../utils'
32
import type { InteractiveResponse } from '../types/api-responses'
3+
import type { LiteralUnion } from '../utils'
44

55
/**
66
* 获取视频地址

src/api/notifications.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { request, toResponse } from '../request'
2-
import type { PaginationOption } from '../types/options'
32
import type { Notifications } from '../types/api-responses'
43
import type { Notification } from '../types/entity'
4+
import type { PaginationOption } from '../types/options'
55

66
/**
77
* 获取通知列表
@@ -23,7 +23,7 @@ export const list = <T = Notifications.ListResponse>(
2323

2424
/**
2525
* 获取合并通知的列表
26-
* @param option 起始通知 ID
26+
* @param id 起始通知 ID
2727
*/
2828
export const listMergedMentions = <
2929
T = Notifications.ListMergedMentionsResponse,

src/api/personal-update.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { request, toResponse } from '../request'
2+
import type { PersonalUpdate } from '../types/api-responses'
23
import type { PostTypeRaw } from '../types/entity'
34
import type { PaginationOption } from '../types/options'
4-
import type { PersonalUpdate } from '../types/api-responses'
55

66
/**
77
* 获取用户动态

src/api/posts.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
import { request, toResponse } from '../request'
2+
import type { Posts } from '../types/api-responses'
23
import type {
34
CreatePostOption,
45
PaginationOption,
56
PostType,
67
} from '../types/options'
7-
import type { Posts } from '../types/api-responses'
88

99
/**
1010
* 发送动态
11+
* @param type 动态类型
1112
* @param content 内容
1213
* @param options 其他选项
1314
*/
@@ -30,6 +31,7 @@ export const create = <T = Posts.CreateResponse>(
3031

3132
/**
3233
* 获取动态详情
34+
* @param type 动态类型
3335
* @param id 动态ID
3436
*/
3537
export const get = <T = Posts.GetResponse>(type: PostType, id: string) =>
@@ -41,9 +43,9 @@ export const get = <T = Posts.GetResponse>(type: PostType, id: string) =>
4143

4244
/**
4345
* 分享动态
46+
* @param type 动态类型
4447
* @param id 动态ID
4548
* @param method 分享方式
46-
* @returns
4749
*/
4850
export const share = <T = {}>(type: PostType, id: string, method: string) =>
4951
toResponse<T>(
@@ -57,6 +59,7 @@ export const share = <T = {}>(type: PostType, id: string, method: string) =>
5759

5860
/**
5961
* 点赞动态
62+
* @param type 动态类型
6063
* @param id 动态ID
6164
*/
6265
export const like = <T = {}>(type: PostType, id: string) =>
@@ -68,6 +71,7 @@ export const like = <T = {}>(type: PostType, id: string) =>
6871

6972
/**
7073
* 取消点赞动态
74+
* @param type 动态类型
7175
* @param id 动态ID
7276
*/
7377
export const unlike = <T = {}>(type: PostType, id: string) =>
@@ -79,6 +83,7 @@ export const unlike = <T = {}>(type: PostType, id: string) =>
7983

8084
/**
8185
* 删除动态
86+
* @param type 动态类型
8287
* @param id 动态ID
8388
*/
8489
export const remove = <T = Posts.RemoveResponse>(type: PostType, id: string) =>
@@ -90,6 +95,7 @@ export const remove = <T = Posts.RemoveResponse>(type: PostType, id: string) =>
9095

9196
/**
9297
* 获取点赞用户列表
98+
* @param type 动态类型
9399
* @param id 动态ID
94100
*/
95101
export const listLikedUsers = <T = Posts.ListLikedUsersResponse>(
@@ -109,6 +115,7 @@ export const listLikedUsers = <T = Posts.ListLikedUsersResponse>(
109115

110116
/**
111117
* 隐藏动态(仅会员)
118+
* @param type 动态类型
112119
* @param id 动态ID
113120
*/
114121
export const hide = <T = Posts.HideResponse>(type: PostType, id: string) =>
@@ -120,6 +127,7 @@ export const hide = <T = Posts.HideResponse>(type: PostType, id: string) =>
120127

121128
/**
122129
* 转为公开动态(仅会员)
130+
* @param type 动态类型
123131
* @param id 动态ID
124132
*/
125133
export const recover = <T = Posts.HideResponse>(type: PostType, id: string) =>

src/api/recommend-feed.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { request, toResponse } from '../request'
2-
import type { ListRecommendFeedOption } from '../types/options'
32
import type { RecommendFeed } from '../types/api-responses'
3+
import type { ListRecommendFeedOption } from '../types/options'
44

55
/**
66
* 获取动态广场

0 commit comments

Comments
 (0)