ecmascript-modernization
Installation
SKILL.md
ECMAScript Modernization
Modernize JavaScript and TypeScript code to yearly ECMAScript standard APIs. The outcome is a codebase that is clearer, safer, smaller, and aligned with the newest runtime the project can honestly support.
Pick The Edition
- ES2016: load
references/es2016.mdforArray.prototype.includesand exponentiation. - ES2017: load
references/es2017.mdforasync/await,Object.values,Object.entries, descriptors, string padding, and trailing commas. - ES2018: load
references/es2018.mdfor object rest/spread, async iteration,Promise.prototype.finally, and RegExp improvements. - ES2019: load
references/es2019.mdforflat,flatMap,Object.fromEntries, string trimming, and optional catch binding. - ES2020: load
references/es2020.mdfor optional chaining, nullish coalescing,Promise.allSettled, dynamic import,globalThis,BigInt, andmatchAll. - ES2021: load
references/es2021.mdfor logical assignment,Promise.any,replaceAll, numeric separators, and weak references. - ES2022: load
references/es2022.mdfor class fields, private fields, top-level await,Error.cause,Object.hasOwn,.at, and RegExp match indices. - ES2023: load
references/es2023.mdfor copy-on-write arrays,findLast,findLastIndex, symbols asWeakMapkeys, and hashbang grammar. - ES2024: load
references/es2024.mdforObject.groupBy,Map.groupBy,Promise.withResolvers, RegExp/v, well-formed strings,Atomics.waitAsync, and resizable/transferable buffers. - ES2025: load
references/es2025.mdfor iterator helpers,Setmethods, import attributes and JSON modules,RegExp.escape, inline RegExp modifiers,Promise.try, and float16 APIs.
When the requested edition is unclear, inspect the code pattern first and load the matching reference. Load multiple year references only when the task spans multiple editions.