Skip to content
Back to skills

Coding Standard Javascript

ASecurity

Enforce JavaScript/ES6+ and TypeScript coding standards including camelCase variables, PascalCase classes, and kebab-case filenames.

  • 27 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 9, 2026
developmentjavascripttypescriptgojavaapi

Works with

  • cli
  • api

Security analysis

A100/100

Scanned September 9, 2026

npx -y skills add jdubray/puffin --skill coding-standard-javascript --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Coding Standard Javascript?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Coding Standard Javascript
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/jdubray-coding-standard-javascript/badge)](https://www.skillsdirectory.com/skills/jdubray-coding-standard-javascript)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: coding-standard-javascript
description: Enforce JavaScript/ES6+ and TypeScript coding standards including camelCase variables, PascalCase classes, and kebab-case filenames.
---

# JavaScript/TypeScript Coding Standards

When reviewing or generating JavaScript/TypeScript code, follow these rules:

## File Naming
- **Source files:** Use kebab-case (e.g., `user-service.js`, `api-client.ts`)
- **Component files:** Use kebab-case (e.g., `user-profile.js`, `data-table.tsx`)
- **Test files:** Use `.test.js` or `.spec.js` suffix (e.g., `user-service.test.js`)
- **Type definition files:** Use `.d.ts` suffix (e.g., `api-types.d.ts`)

## Variable Naming
- **Variables:** camelCase (e.g., `userName`, `isActive`, `totalCount`)
- **Constants:** UPPER_SNAKE_CASE for true constants (e.g., `MAX_RETRIES`, `API_BASE_URL`)
- **Boolean variables:** Prefix with `is`, `has`, `can`, `should` (e.g., `isLoading`, `hasError`)

## Function Naming
- **Functions:** camelCase (e.g., `calculateTotal()`, `fetchUserData()`)
- **Async functions:** Consider prefixing with action verb (e.g., `loadUsers()`, `saveDocument()`)
- **Event handlers:** Prefix with `handle` or `on` (e.g., `handleClick`, `onSubmit`)
- **Factory functions:** Prefix with `create` (e.g., `createUser()`, `createConnection()`)

## Class/Constructor Naming
- **Classes:** PascalCase (e.g., `UserService`, `DataProcessor`, `ApiClient`)
- **Interfaces (TS):** PascalCase, optionally prefix with `I` (e.g., `IUserService` or `UserService`)
- **Type aliases (TS):** PascalCase (e.g., `UserResponse`, `ConfigOptions`)
- **Enums (TS):** PascalCase for enum name, UPPER_SNAKE_CASE for values

## Private Members
- **Private fields:** Prefix with underscore (e.g., `_privateData`, `_internalState`)
- **Private methods:** Prefix with underscore (e.g., `_validateInput()`, `_processData()`)

## Module Organization
- Group imports: external packages first, then internal modules
- Export public API at the bottom of the file
- One class/component per file when possible

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.