Skip to content

Commit df7210e

Browse files
committed
rename instructions file
1 parent 42a9e20 commit df7210e

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

.github/instructions/generic/ui.instructions.md renamed to .github/instructions/generic/ember.instructions.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ The application uses modern Ember Octane patterns, Handlebars templates, and SCS
3333
- **Build System**: Ember CLI with Webpack for bundling and asset management
3434
- **Development**: ESLint for code linting, Prettier for code formatting
3535

36+
## File Naming and TypeScript Adoption
37+
- **New Files**: All new JavaScript files must use `.ts` extension for TypeScript
38+
- **Legacy File Migration**: When editing existing `.js` files, assess the effort required to convert to `.ts` and prioritize conversion if time permits
39+
- **Component Structure**: Components should have matching `.ts` and `.hbs` files in the same directory
40+
- **Gradual Migration**: The codebase is transitioning from JavaScript to TypeScript - contribute to this effort when possible
41+
3642
## Build and Deployment Structure
3743
- **Development Build**: `ember serve` creates development server with live reload
3844
- **Production Build**: `ember build --environment=production` generates optimized assets in `dist/`
@@ -57,6 +63,8 @@ The application uses modern Ember Octane patterns, Handlebars templates, and SCS
5763
- Update comments when code changes to maintain accuracy
5864

5965
## TypeScript Guidelines
66+
- **File Naming**: All new files should use `.ts` extension instead of `.js`
67+
- **Migration Strategy**: When modifying existing `.js` files, evaluate the effort required to convert to `.ts` and prioritize conversion if time permits
6068
- Use explicit types instead of `any` - prefer `unknown` for truly dynamic content
6169
- Define interfaces for object shapes and function signatures
6270
- Use type guards and discriminated unions for runtime type checking
@@ -66,7 +74,7 @@ The application uses modern Ember Octane patterns, Handlebars templates, and SCS
6674
- Replace `Route.extend`, `Model.extend`, or `Component.extend` with native JavaScript classes
6775
- Use Ember Octane conventions: tracked properties, decorators, and native class syntax
6876
- Create reusable components rather than one-off implementations
69-
- Co-locate component templates (`.hbs`) with their JavaScript/TypeScript files
77+
- Co-locate component templates (`.hbs`) with their TypeScript files (`.ts` preferred over `.js`)
7078
- Prioritize reusability and maintainability when creating components - avoid overly complex or one-off implementations
7179

7280
## Asynchronous Programming
@@ -97,7 +105,7 @@ The application uses modern Ember Octane patterns, Handlebars templates, and SCS
97105
- Use `@tracked` only for internal component state that changes over time
98106
- Never use `@tracked` on component arguments (properties passed from parent components)
99107
- Component class names must match their file names exactly
100-
- Place `.hbs` templates in the same directory as their `.js` or `.ts` files within `vault/ui/app/components/`
108+
- Place `.hbs` templates in the same directory as their `.ts` files (or `.js` for legacy files) within `vault/ui/app/components/`
101109
- Organize new components in logical subdirectories by feature or domain
102110
- Remove quotes around dynamic data attributes: `data-test-id={{value}}` not `data-test-id="{{value}}"`
103111

0 commit comments

Comments
 (0)