refactor: 优化eslint配置,提升代码质量 (#1341)
* feat: 统一并标准化eslint * lint: napcat.webui * lint: napcat.webui * lint: napcat.core * build: fix * lint: napcat.webui * refactor: 重构eslint * Update README.md
This commit is contained in:
651 files changed
+37978
-37584
No files matched your search
@@ -1,15 +1,15 @@
|
||||
import { ZodSchema } from 'zod'
|
||||
import { ZodSchema } from 'zod';
|
||||
|
||||
import oneBotHttpApiGroup from './group'
|
||||
import oneBotHttpApiMessage from './message'
|
||||
import oneBotHttpApiSystem from './system'
|
||||
import oneBotHttpApiUser from './user'
|
||||
import oneBotHttpApiGroup from './group';
|
||||
import oneBotHttpApiMessage from './message';
|
||||
import oneBotHttpApiSystem from './system';
|
||||
import oneBotHttpApiUser from './user';
|
||||
|
||||
type AllKey =
|
||||
| keyof typeof oneBotHttpApiUser
|
||||
| keyof typeof oneBotHttpApiMessage
|
||||
| keyof typeof oneBotHttpApiGroup
|
||||
| keyof typeof oneBotHttpApiSystem
|
||||
| keyof typeof oneBotHttpApiSystem;
|
||||
|
||||
export type OneBotHttpApi = Record<
|
||||
AllKey,
|
||||
@@ -18,17 +18,17 @@ export type OneBotHttpApi = Record<
|
||||
request: ZodSchema
|
||||
response: ZodSchema
|
||||
}
|
||||
>
|
||||
>;
|
||||
|
||||
const oneBotHttpApi: OneBotHttpApi = {
|
||||
...oneBotHttpApiUser,
|
||||
...oneBotHttpApiMessage,
|
||||
...oneBotHttpApiGroup,
|
||||
...oneBotHttpApiSystem
|
||||
} as const
|
||||
...oneBotHttpApiSystem,
|
||||
} as const;
|
||||
|
||||
export type OneBotHttpApiPath = keyof OneBotHttpApi
|
||||
export type OneBotHttpApiPath = keyof OneBotHttpApi;
|
||||
|
||||
export type OneBotHttpApiContent = OneBotHttpApi[OneBotHttpApiPath]
|
||||
export type OneBotHttpApiContent = OneBotHttpApi[OneBotHttpApiPath];
|
||||
|
||||
export default oneBotHttpApi
|
||||
export default oneBotHttpApi;
|
||||
Reference in new issue
Block a user