javascript-coding-standards

Enforces Airbnb-style JavaScript coding standards with ESLint, Prettier, and Jest testing configurations.

4|Updated Mar 28, 2026
One-click install
npx skills add https://github.com/minexo79/coser-card-maker --skill javascript-coding-standards-minexo79
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: javascript-coding-standards
Source: https://github.com/minexo79/coser-card-maker/tree/main/.kilo/skills/coding-standards/javascript
Command: npx skills add https://github.com/minexo79/coser-card-maker --skill javascript-coding-standards-minexo79

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? JavaScript projects often suffer from inconsistent code style, missing tests, and security gaps when teams lack a shared set of conventions. This Skill provides a complete, layered reference of JavaScript/ES6+ coding standards so generated or reviewed code follows consistent, maintainable patterns. ## Core Features & Use Cases - Style & Formatting Rules: Airbnb-based ESLint and Prettier configurations covering modern ES6+ syntax, immutability, and module patterns. - Testing Standards: Jest best practices with mocking, parameterized tests, and 80% coverage thresholds. - React & Async Patterns: Hooks-based component patterns, custom hooks, error handling hierarchies, and async/await concurrency strategies. - Use Case: When scaffolding a new Express API or React component, apply these standards so the output includes proper error classes, input validation, JSDoc annotations, and matching Jest tests. ## Quick Start Apply the JavaScript coding standards skill to review my src/ directory and refactor the code to follow Airbnb style with proper error handling and Jest tests.

Frequently Asked Questions about javascript-coding-standards

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up ESLint with the Airbnb style guide?

Install eslint and prettier as dev dependencies, then extend airbnb-base and prettier in your .eslintrc.json. The provided configuration enables ES2022, ES modules, and rules like prefer-const, no-var, and arrow-body-style.

How to write Jest tests with mocks for async functions?

Use jest.mock() to stub module dependencies, then structure tests with describe/test blocks and the Arrange-Act-Assert pattern. The standards include examples with mockResolvedValue, rejects.toThrow for async errors, and test.each for parameterized cases.

What code coverage threshold should a JavaScript project enforce?

The Jest configuration enforces 80% coverage for branches, functions, lines, and statements globally. Coverage is collected from src/**/*.js while excluding test files and index files.

Does this style guide cover React hooks patterns?

Yes, it covers functional components with useState, useEffect, useCallback, and useMemo, plus custom hooks with cleanup functions to prevent state updates on unmounted components. Data fetching patterns include loading and error states.

How should JavaScript apps handle secrets and environment variables?

Never hardcode secrets in source code. Load them with dotenv from environment variables and validate that all required variables exist at startup, throwing an error if any are missing.

Why is using var or == considered bad practice in modern JavaScript?

var has function-scoped hoisting that causes subtle bugs, while == performs type coercion leading to unexpected comparisons. The standards enforce const/let and strict equality (===) through ESLint rules no-var and eqeqeq-style checks.