SuperAPI AI Directory

ember-best-practices

Coding & development

View repository

Updated 10-15 21:38

About this skill

Ember.js Best Practices

Comprehensive performance optimization and accessibility guide for Ember.js applications. Contains 60 rules across 10 categories, prioritized by impact to guide automated refactoring and code generation.

When to Apply

Reference these guidelines when:

  • Writing new Ember components or routes
  • Implementing data fetching with WarpDrive
  • Reviewing code for performance issues
  • Refactoring existing Ember.js code
  • Optimizing bundle size or load times
  • Implementing accessibility features

Rule Categories by Priority

Priority Category Impact Prefix
1 Route Loading and Data Fetching CRITICAL route-
2 Build and Bundle Optimization CRITICAL bundle-
3 Component and Reactivity HIGH component-, exports-
4 Accessibility Best Practices HIGH a11y-
5 Service and State Management MEDIUM-HIGH service-
6 Template Optimization MEDIUM template-, helper-
7 Performance Optimization MEDIUM performance-
8 Testing Best Practices MEDIUM testing-
9 Tooling and Configuration MEDIUM vscode-
10 Advanced Patterns MEDIUM-HIGH advanced-

Quick Reference

1. Route Loading and Data Fetching (CRITICAL)

2. Build and Bundle Optimization (CRITICAL)

3. Component and Reactivity Optimization (HIGH)

4. Accessibility Best Practices (HIGH)

5. Service and State Management (MEDIUM-HIGH)

6. Template Optimization (MEDIUM)

7. Performance Optimization (MEDIUM)

8. Testing Best Practices (MEDIUM)

9. Tooling and Configuration (MEDIUM)

10. Advanced Patterns (MEDIUM-HIGH)

How to Use

Each entry in the Quick Reference links to its rule in references/. Read the rules that apply to the task before writing or reviewing code, rather than loading them all.

Each rule file contains:

  • Brief explanation of why it matters
  • Incorrect code example with explanation
  • Correct code example with explanation
  • Links to the official documentation it is based on

Accessibility with OSS Tools

Ember has excellent accessibility support through community addons:

  • ember-a11y-testing - Automated accessibility testing in your test suite
  • ember-a11y-refocus - Route announcements and focus management
  • ember-focus-trap - Focus trapping for modals and dialogs
  • ember-page-title - Accessible page title management
  • Platform-native validation - Use browser's Constraint Validation API for accessible form validation

These tools, combined with native web platform features, provide comprehensive a11y support with minimal configuration.

Full Compiled Document

For the complete guide with all rules expanded: AGENTS.md