@thomaslorincz/create-project 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.cursorrules +8 -0
- package/package.json +1 -1
- package/src/templates/root.ts +2 -1
package/.cursorrules
CHANGED
|
@@ -5,3 +5,11 @@
|
|
|
5
5
|
# TypeScript
|
|
6
6
|
- Prefer interfaces over types unless an interface is not possible
|
|
7
7
|
- Avoid using ReturnType over defining standalone types for return values
|
|
8
|
+
|
|
9
|
+
# React
|
|
10
|
+
- Prefer export default function Component over having an export at the end of the file
|
|
11
|
+
- Prefer component props to be named just Props instead of ComponentNameProps for simplicity
|
|
12
|
+
- Prefer to "import { Thing } from React" rather than "import * as React" with usage as React.Thing
|
|
13
|
+
- Use React Query when applicable for server state
|
|
14
|
+
- Avoid useEffect unless it is applicable and necessary
|
|
15
|
+
- Avoid manual useCallback/useMemo by default; React Compiler handles most memoization in this project. Add them only when needed for non-React consumers, opt-out components, or other cases the compiler cannot optimize.
|
package/package.json
CHANGED
package/src/templates/root.ts
CHANGED
|
@@ -79,9 +79,10 @@ export const cursorRules = `# General
|
|
|
79
79
|
# React
|
|
80
80
|
- Prefer export default function Component over having an export at the end of the file
|
|
81
81
|
- Prefer component props to be named just Props instead of ComponentNameProps for simplicity
|
|
82
|
+
- Prefer to "import { Thing } from React" rather than "import * as React" with usage as React.Thing
|
|
82
83
|
- Use React Query when applicable for server state
|
|
83
84
|
- Avoid useEffect unless it is applicable and necessary
|
|
84
|
-
- Avoid useCallback
|
|
85
|
+
- Avoid manual useCallback/useMemo by default; React Compiler handles most memoization in this project. Add them only when needed for non-React consumers, opt-out components, or other cases the compiler cannot optimize.
|
|
85
86
|
`;
|
|
86
87
|
|
|
87
88
|
export const oxlintConfig = `${JSON.stringify(
|