Frontend Performance Optimization

Best practices to improve web performance and Lighthouse score.

Install via CLI
$ npx @airuleshub/cli@latest add frontend-performance-optimization

Rule Content

When writing frontend code, follow these performance rules:

  1. Reduce JavaScript bundle size.

  2. Lazy load components when possible.

  3. Use code splitting.

  4. Avoid unnecessary state updates.

  5. Debounce expensive operations.

  6. Optimize images and use modern formats (WebP).

  7. Avoid blocking scripts.

  8. Use memoization for heavy computations.

  9. Reduce DOM nodes where possible.

  10. Ensure Lighthouse performance score stays above 90.

Command Palette

Search for a command to run...