You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .cursor/rules/file-structures.mdc
-3Lines changed: 0 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,6 @@ The `packages/core/src` directory generally contains the following:
17
17
- **`utils/`**: Includes utility functions that are not specific to any single component or hook.
18
18
- **`types/`**: Defines shared TypeScript types and interfaces used throughout the `@vibe/core` library.
19
19
- **`constants/`**: Stores constant values used across the library.
20
-
- **`storybook/`**: Contains global Storybook configurations, decorators, or providers.
21
20
- **`styles/`**: Can include global styles or theme-related style files, although most component-specific styling is co-located with the component. It is preferred to not add new code to this directory.
22
21
- **`index.ts`**: The main export file for the `@vibe/core` library, re-exporting key modules and components.
23
22
@@ -37,8 +36,6 @@ Each component within `packages/core/src/components/` should follow a consistent
37
36
- **`__tests__/`**: Contains unit and integration tests **only for the main component files** in the root directory.
38
37
- Files within this directory follow the pattern `ComponentName.test.ts`.
39
38
- **DO NOT** place tests for subcomponents, hooks, utils, or context in this directory.
40
-
- **`__stories__/`**: Holds Storybook stories for the component.
41
-
- Files are typically named `ComponentName.stories.tsx`.
42
39
- **`components/`**: For more complex components, this directory can house sub-components that are only used by `ComponentName`.
43
40
- **Each subcomponent should have its own `__tests__/` directory** if tests are needed.
Copy file name to clipboardExpand all lines: .cursor/rules/naming-conventions.mdc
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -44,7 +44,7 @@ This document outlines the naming conventions to be followed when developing wit
44
44
- **Utility Tests**: Place in `ComponentName/utils/__tests__/utilityName.test.ts`
45
45
- **Context Tests**: Place in `ComponentName/context/__tests__/ComponentNameContext.test.ts`
46
46
- **DO NOT** centralize all tests in the component root `__tests__` directory.
47
-
- **Stories**: Storybook files SHOULD be placed in a `__stories__` subdirectory.
47
+
- **Stories**: Storybook files SHOULD be placed in a `packages/docs` subdirectory.
48
48
- Story files typically follow the pattern `ComponentName.stories.tsx`.
49
49
- Refer to the storybook-stories.mdc file in the monorepo for Storybook specific conventions.
50
50
- **Helper/Utility Files**: Utility functions or helper components specific to a single component can be placed in a `helper` or `utils` subdirectory, or directly within the component folder if small and highly specific.
Copy file name to clipboardExpand all lines: .cursor/rules/storybook-stories.mdc
+14-16Lines changed: 14 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -1,26 +1,24 @@
1
1
---
2
-
description: "Guides the creation and modification of Storybook files specifically within the 'packages/core' package. It covers conventions, best practices, and helps answer questions about existing story implementations within 'packages/core'."
2
+
description: "Guides the creation and modification of Storybook files specifically within the 'packages/docs' package. It covers conventions, best practices, and helps answer questions about existing story implementations within 'packages/core'."
3
3
globs:
4
-
- "packages/core/**/__stories__/**/*.stories.tsx"
5
-
- "packages/core/**/__stories__/**/*.mdx"
6
-
- "packages/core/src/storybook/**"
4
+
- "packages/docs/**/*.stories.tsx"
5
+
- "packages/docs/**/*.mdx"
7
6
alwaysApply: false
8
7
---
9
8
10
-
# Storybook Stories for @vibe/core library
9
+
# Storybook Stories for @vibe/docs library
11
10
12
-
This document outlines the rules and best practices for creating and maintaining Storybook stories for the `@vibe/core` library.
13
-
14
-
**Storybook Scope:** Storybook is exclusively used for the `@vibe/core` library within this monorepo. Do not create stories for components or utilities in other packages. Stories should _only_ be written for UI components found in `packages/core/src/components/`. Stories for custom hooks (e.g., `useWizard`) are not to be created.
11
+
This document outlines the rules and best practices for creating and maintaining Storybook stories for the `@vibe/docs` library.
15
12
16
13
## 1. File Structure and Naming Conventions
17
14
18
-
- **Location:** Component stories **must** be co-located with their respective component. Each component that requires stories must have a `__stories__` subdirectory.
- **Story File:** Inside the `__stories__` directory, the main story file **must** be named after the component, using PascalCase, followed by the `.stories.tsx` extension.
0 commit comments