Cursor rule
.cursor/rules/api.mdc[object Object]
Cursor rules
Quality
45/100
Scores the file, not the repository.Length
166 words
3 headings · 2 code blocksRepository
0
— · pushed 377 days agoLast changed
3 days ago
First indexed 3 days ago.123456# API 请求规范78## 1. 请求函数命名和结构9```typescript10// service/api/user.ts11import { request } from '@/service/request';1213// 获取用户列表14export const fetchUserList = (params: UserListParams) => {15 return request<UserListResponse>({16 url: '/user/list',17 method: 'GET',18 params,19 });20};2122// 获取用户详情23export const fetchUserById = (id: string) => {24 return request<UserInfo>({25 url: `/user/${id}`,26 method: 'GET',27 });28};2930// 创建用户31export const createUser = (data: CreateUserData) => {32 return request<ApiResponse>({33 url: '/user',34 method: 'POST',35 data,36 });37};3839// 更新用户40export const updateUser = (id: string, data: UpdateUserData) => {41 return request<ApiResponse>({42 url: `/user/${id}`,43 method: 'PUT',44 data,45 });46};4748// 删除用户49export const deleteUser = (id: string) => {50 return request<ApiResponse>({51 url: `/user/${id}`,52 method: 'DELETE',53 });54};55```5657### 2. 类型定义规范58```typescript59// types/api.d.ts60interface ApiResponse<T = any> {61 code: number;62 message: string;63 data: T;64}6566interface UserInfo {67 id: string;68 name: string;69 email: string;70 role: string;71 createTime: string;72 updateTime: string;73}7475interface UserListParams {76 page: number;77 pageSize: number;78 keyword?: string;79 role?: string;80}8182interface UserListResponse {83 list: UserInfo[];84 total: number;85}86```8788
Also in crunl/Xingyu-Frontend
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| crunl/Xingyu-Frontend.cursor/rules/comments.mdc · 0 | Cursor rules | securityapidocs | 46/100 | 3 days ago | |
| crunl/Xingyu-Frontend.cursor/rules/componenting.mdc · 0 | Cursor rules | no sections | 45/100 | 3 days ago | |
| crunl/Xingyu-Frontend.cursor/rules/naming.mdc · 0 | Cursor rules | archtypesapiui | 58/100 | 3 days ago | |
| crunl/Xingyu-Frontend.cursor/rules/project.mdc · 0 | Cursor rules | no sections | 50/100 | 3 days ago | |
| crunl/Xingyu-Frontend.cursor/rules/reduxing.mdc · 0 | Cursor rules | no sections | 45/100 | 3 days ago | |
| crunl/Xingyu-Frontend.cursor/rules/routing.mdc · 0 | Cursor rules | no sections | 53/100 | 3 days ago | |
| crunl/Xingyu-Frontend.cursor/rules/styling.mdc · 0 | Cursor rules | archui | 54/100 | 3 days ago | |
| crunl/Xingyu-Frontend.cursor/rules/typescript.mdc · 0 | Cursor rules | typesdocs | 42/100 | 3 days ago |
Diff against .cursor/rules/comments.mdc Diff against .cursor/rules/componenting.mdc Diff against .cursor/rules/naming.mdc Diff against .cursor/rules/project.mdc Diff against .cursor/rules/reduxing.mdc Diff against .cursor/rules/routing.mdc Diff against .cursor/rules/styling.mdc Diff against .cursor/rules/typescript.mdc
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126 | Cursor rules | setupbuildtestlint-format+6 | 100/100 | 3 days ago | |
| TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 45 | Cursor rules | testlint-formatstylearch+5 | 100/100 | 3 days ago | |
| markstev/mark-starter.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+6 | 99/100 | 3 days ago | |
| Allymahmoud/case-intake-platform.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| dodgecfr/combatfilms-webapp.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| deifos/clipmira-subtitles.cursor/rules/frontend.mdc · 1 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| langflow-ai/langflow.cursor/rules/docs_development.mdc · 153k | Cursor rules | setupbuildtestlint-format+7 | 97/100 | 3 days ago | |
| TechSquidTV/Hermes.cursor/rules/20-hermes-api-tests.mdc · 45 | Cursor rules | teststyletesting-strategysecurity+3 | 97/100 | 3 days ago |
