Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By codingjoev0.1.0AGPL-3.0-or-laterIn 1 marketplace
Rewrites outdated JavaScript and TypeScript syntax into modern ECMAScript features, limited to what your target browsers support. Runs as a CLI, pre-commit hook, Husky step, or agent skill.
Trending plugins
7-day copy clicks
Claude loads one when your task matches it, or you run it by name.
Executables (bin/) — files in this plugin's bin/ directory are added to the Bash tool's PATH while the plugin is enabled.
1 marketplace, most starred first
ecmascript, codemod, syntax-upgrade, browser-support, baseline, ast-transform, modernize, upgrade ·
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Keeping your JavaScript and TypeScript code up to date with full browser compatibility.
esupgrade is safe and meant to be used automatically on your codebase. We recommend integrating it into your development workflow using [pre-commit], [husky], or as an agent skill.
To try it out on a repository without writing changes, run:
npx -y esupgrade $(git ls-files | grep -E -i -w '.*\.(t|j)sx?')
To transform code from standard input, pass - as the input path:
echo 'var x = 1;' | npx esupgrade -
For help with available options:
npx esupgrade --help
uvx pre-commit install
# .pre-commit-config.yaml
repos:
- repo: https://github.com/codingjoe/esupgrade
rev: 2025.0.2 # Use the latest version
hooks:
- id: esupgrade
pre-commit run esupgrade --all-files
Assuming Husky is already initialized and .husky/pre-commit already contains set -e, append:
echo "git diff --cached --name-only --diff-filter=ACMR -z -- '*.js' '*.jsx' '*.ts' '*.tsx' '*.mjs' '*.cjs' | xargs -0 sh -c 'test \"\$#\" -eq 0 && exit 0; npx -y esupgrade -- \"\$@\"' sh" >> .husky/pre-commit
echo "git diff --cached --name-only --diff-filter=ACMR -z -- '*.js' '*.jsx' '*.ts' '*.tsx' '*.mjs' '*.cjs' | xargs -0 sh -c 'test \"\$#\" -eq 0 && exit 0; git add -- \"\$@\"' sh" >> .husky/pre-commit
esupgrade is available as a skill in [Claude Code]. The plugin is distributed via the codingjoe/claude-plugins marketplace. To use it:
/plugin marketplace add codingjoe/claude-plugins/plugin install esupgrade@codingjoeThe skill will analyze your selected code and suggest transformations based on the Baseline browser support policy.
All transformations are based on [Web Platform Baseline][baseline] features. Baseline tracks which web platform features are safe to use across browsers.
By default, esupgrade uses widely available features, meaning they work in all major browsers (Chrome, Edge, Safari, Firefox) for at least 30 months. This ensures full compatibility while keeping your code modern.
You can opt into newly available features (available in all browsers for 0-30 months) with:
npx esupgrade --baseline newly-available <files>
For more information about Baseline browser support, visit [web.dev/baseline][baseline].
.js - JavaScript.jsx - React/JSX.ts - TypeScript.tsx - TypeScript with JSX.d.ts - TypeScript declaration files.mjs - ES Modules.cjs - CommonJS[!NOTE] A transformation applies to code with a statically verifiable type. Code that shadows a global such as
Array, or that accesses a method through a computed member such asarray[method](), stays unchanged.
using and await using declarations are never rewritten, because the replacement would
drop the resource disposal.
var → [const][mdn-const] & [let][mdn-let]-var x = 1;
-var y = 2;
-y = 3;
+const x = 1;
+let y = 2;
+y = 3;
Declarations keep var when:
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
esupgrade@codingjoe is listed by codingjoe/claude-plugins — review the source before installing
npx claudepluginhub codingjoe/claude-plugins --plugin esupgradePlugins from other owners that cover similar ground