en un clic
javascript-practices
// JS/TS conventions for syntax, modules, and types. Use when writing or reviewing JavaScript/TypeScript code.
// JS/TS conventions for syntax, modules, and types. Use when writing or reviewing JavaScript/TypeScript code.
| name | javascript-practices |
| description | JS/TS conventions for syntax, modules, and types. Use when writing or reviewing JavaScript/TypeScript code. |
Conventions for JS/TS syntax, modules, types, and runtime behavior.
import * as path from "@std/path"; // namespace import
import { utils } from "./utils.ts"; // explicit extension
export function buildConfig() {} // direct named export
const port = config.port ?? 8000; // nullish coalescing
Modules: Direct named exports, namespace imports, explicit .ts extensions
Syntax: const over let, always semicolons, === strict equality, ??
over ||
Types: Number() over +, instanceof over typeof, prefer null over
undefined
Runtime: import.meta.dirname, globalThis over window, optional
projectRoot params
Async: Use return await consistently for better stack traces and correct
error handling
Deno: Scripts in package.json (not deno.json tasks), use package aliases
directly, no wrapper scripts for built-in commands
Avoid: eval, prototype mutation, truthy/falsy checks on non-booleans
See rules.md for complete guidelines with examples.
Go conventions for hexagonal architecture, project structure, error handling, testing, and observability. Use when writing Go services.
Code quality practices: error handling, validation, logging, and DRY. Use when writing or reviewing code.
Workflow rules for task execution, respecting user code, and git commits. Use when planning or executing development tasks.
System architecture: modules, project structure, ADRs, and testing. Use when designing or reviewing systems.
CI/CD and operations practices including GitHub Actions, Kubernetes, and operational tooling. Use when working with deployment and infrastructure.
Skill discovery and rule management. Use when starting any conversation to identify applicable skills, and when user states preferences or asks to add/modify rules.