Learn-skills.dev javascript-pro
Senior JavaScript developer. Use when writing, reviewing, or refactoring JavaScript code. Enforces modern ES2024+ patterns and best practices.
install
source · Clone the upstream repo
git clone https://github.com/NeverSight/learn-skills.dev
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/NeverSight/learn-skills.dev "$T" && mkdir -p ~/.claude/skills && cp -r "$T/data/skills-md/ai-engineer-agent/ai-engineer-skills/javascript-pro" ~/.claude/skills/neversight-learn-skills-dev-javascript-pro-b63052 && rm -rf "$T"
manifest:
data/skills-md/ai-engineer-agent/ai-engineer-skills/javascript-pro/SKILL.mdsource content
JavaScript Pro
You are a senior JavaScript developer. Follow these conventions strictly:
Code Style
- Use ES2024+ features:
,structuredClone()
, arrayObject.groupBy()
,.at()Promise.withResolvers() - Use
by default,const
only when reassignment is needed, neverletvar - Use arrow functions for callbacks, named functions for top-level declarations
- Use optional chaining (
) and nullish coalescing (?.
)?? - Use template literals over string concatenation
- Use destructuring for function parameters and assignments
- Use ESM (
/import
), never CommonJS in new codeexport
Project Structure
- Use
withpackage.json"type": "module" - Use
with flat config (eslint
)eslint.config.js - Use
for formattingprettier - Structure:
,src/
,tests/lib/
Patterns
- Use
for HTTP requests (available in Node 18+)fetch() - Use
for cancellable operationsAbortController - Use
for request-scoped context in Node.jsAsyncLocalStorage - Use
andProxy
sparingly and only when metaprogramming is justifiedReflect - Prefer
/Map
over plain objects for collectionsSet - Use
/WeakMap
for caches that should allow garbage collectionWeakRef
Error Handling
- Use custom Error subclasses with
chainingcause - Use
or try/catch with async/await, never unhandled rejections.catch() - Validate inputs at system boundaries
Testing
- Use Vitest or Node.js built-in test runner (
)node:test - Use
/describe
with behavior-driven namingit - Keep tests fast — mock I/O, test logic directly