Legacy js

From thedaviddias/Front-End-Checklist · View interactive version

Legacy js is an AI agent skill from the GitHub repository thedaviddias/Front-End-Checklist. Use when auditing slow page loads, heavy assets, or rendering delays related to Avoid serving legacy JavaScript to modern browsers. Verify the actual bottleneck in DevTools, Lighthouse, or field data before recommending changes.

How to use this skill

Skill file

Avoid serving legacy JavaScript to modern browsers

Modern browsers can execute ES6+ code faster and more efficiently; serving them transpiled ES5 with polyfills adds unnecessary weight.

Quick Reference

Check

Analyze the project's JavaScript output to see if modern browsers are being served unnecessary ES5 code and polyfills.

Fix

Update the build configuration to use differential serving and set a modern target for your primary JavaScript output.

Explain

Explain how serving ES6+ code to modern browsers improves performance and why transpiling everything to ES5 is no longer recommended.

Code Review

Review the routes, assets, and loading behavior that affect Avoid serving legacy JavaScript to modern browsers. Flag exact files, requests, or rendering steps that add unnecessary network, CPU, or layout cost, and describe the measurement method used to confirm the issue.


For full implementation details, code examples, and framework-specific guidance,

see references/rule.md.

Rule page: https://frontendchecklist.io/rules/performance/legacy-js

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.