Skip to content

Commit b1f2725

Browse files
committed
internal: Move github rules to cursor rules
1 parent a51c04d commit b1f2725

File tree

3 files changed

+19
-10
lines changed

3 files changed

+19
-10
lines changed

.github/instructions/manager.instructions.md renamed to .cursor/rules/manager.mdc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
---
2-
applyTo: '**/*.ts'
2+
description: Guidelines for implementing @data-client/react Managers
3+
globs:
4+
- '**/*.ts'
5+
alwaysApply: false
36
---
47
# Guide: Using `@data-client/react` Managers for global side effects
58

@@ -131,4 +134,4 @@ ReactDOM.createRoot(document.body).render(
131134
<App />
132135
</DataProvider>,
133136
);
134-
```
137+
```

.github/instructions/react.instructions.md renamed to .cursor/rules/react.mdc

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
---
2-
applyTo: '**/*.tsx'
2+
description: Usage patterns for @data-client/react hooks and components
3+
globs:
4+
- '**/*.tsx'
5+
alwaysApply: false
36
---
4-
57
## Rendering
68

79
```ts
@@ -18,7 +20,7 @@ const todo = useCache(TodoResource.get, { id: 5 });
1820
const todo = useQuery(Todo, { id: 5 });
1921
```
2022

21-
For API definitions (like TodoResource), refer to the [@data-client/rest guide](.github/instructions/rest.instructions.md).
23+
For API definitions (like TodoResource), refer to the [@data-client/rest guide](.cursor/rules/rest.mdc).
2224

2325
## Mutations
2426

@@ -107,7 +109,7 @@ const todosByUser = useQuery(groupTodoByUser);
107109
Custom [Managers](https://dataclient.io/docs/api/Manager) allow for global side effect handling.
108110
This is useful for webosckets, SSE, logging, etc.
109111

110-
For more detailed usage, refer to the [Manager Guide](.github/instructions/manager.instructions.md).
112+
For more detailed usage, refer to the [Manager Guide](.cursor/rules/manager.mdc).
111113

112114
## Best Practices & Notes
113115

@@ -123,4 +125,4 @@ For more detailed usage, refer to the [Manager Guide](.github/instructions/manag
123125
- [useSuspense](https://dataclient.io/docs/api/useSuspense)
124126
- [Controller](https://dataclient.io/docs/api/Controller)
125127

126-
**ALWAYS follow these patterns and refer to the official docs for edge cases. Prioritize code generation that is idiomatic, type-safe, and leverages automatic normalization/caching via schema definitions.**
128+
**ALWAYS follow these patterns and refer to the official docs for edge cases. Prioritize code generation that is idiomatic, type-safe, and leverages automatic normalization/caching via schema definitions.**

.github/instructions/rest.instructions.md renamed to .cursor/rules/rest.mdc

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
---
2-
applyTo: '**/*.ts*'
2+
description: Patterns for using @data-client/rest to model resources and endpoints
3+
globs:
4+
- '**/*.ts'
5+
- '**/*.tsx'
6+
alwaysApply: false
37
---
48
# Guide: Using `@data-client/rest` for Resource Modeling
59

@@ -137,7 +141,7 @@ const groupTodoByUser = new schema.Query(
137141
);
138142
```
139143

140-
For more detailed usage, refer to the [@data-client/react guide](.github/instructions/react.instructions.md).
144+
For more detailed usage, refer to the [@data-client/react guide](.cursor/rules/react.mdc).
141145

142146
---
143147

@@ -241,4 +245,4 @@ export const IssueResource = resource({
241245
- [Schema Guide](https://dataclient.io/rest/api/schema#schema-overview)
242246
- [Relational Data Guide](https://dataclient.io/rest/guides/relational-data)
243247

244-
**ALWAYS follow these patterns and refer to the official docs for edge cases. Prioritize code generation that is idiomatic, type-safe, and leverages automatic normalization/caching via schema definitions.**
248+
**ALWAYS follow these patterns and refer to the official docs for edge cases. Prioritize code generation that is idiomatic, type-safe, and leverages automatic normalization/caching via schema definitions.**

0 commit comments

Comments
 (0)