# Formatting Standards

> Formatting and linting standards using GTS, ESLint, and Prettier. Use when writing or formatting TypeScript code in this project. Use when this capability is needed.

- Skill: `tomevault-io/formatting-standards` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/formatting-standards`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/formatting-standards/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/formatting-standards

---


# Formatting Standards

## Tools

This repository uses:

- **ESLint** for code quality (extends GTS)
- **Prettier** for formatting (extends GTS)
- **GTS** (Google TypeScript Style) for TypeScript style

## Configuration Files

- `.eslintrc.json` - ESLint configuration (extends GTS)
- `.prettierrc.js` - Prettier configuration (extends GTS)
- `.eslintignore` - Files to ignore for linting
- `.prettierignore` - Files to ignore for formatting

## Formatting Rules

Based on GTS and project configuration:

- **Indentation**: 4 spaces (not tabs)
- **Line Width**: 160 characters
- **Import Spacing**: Spaces around braces: `{ Item }` not `{Item}`
- **Function Signatures**: Multi-line when they exceed print width
- **Arrow Functions**: Parentheses around single parameters: `(x) =>` not `x =>`
- **Quotes**: Single quotes (from GTS)
- **Semicolons**: Required (from GTS)
- **Trailing Commas**: ES5 style (from GTS)

## Running Formatting

```bash
# Format all files
npm run format

# Check formatting without writing
npm run format:check

# Format and fix linting issues
npm run format:fix
```

## VS Code Integration

Format on save is configured in `.vscode/settings.json`:

- Prettier is the default formatter
- ESLint auto-fix on save
- Format on save enabled for TypeScript, JavaScript, JSON

## Before Committing

Always run:

```bash
npm run format:fix
```

This ensures:

- Code is formatted according to GTS/Prettier rules
- Linting issues are automatically fixed
- Consistent code style across the repository

---
> Converted and distributed by [TomeVault](https://tomevault.io/claim/crmagz) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-11 -->

