Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions .claude/skills/coding-standards/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ Coding standards for the Expensify App. Each standard is a standalone file in `r
| Category | Prefix | Focus |
|----------|--------|-------|
| Performance | `PERF-*` | Render optimization, memo patterns, useEffect hygiene, data selection |
| Consistency | `CONSISTENCY-*` | Platform checks, magic values, unused props, ESLint discipline |
| Clean React Patterns | `CLEAN-REACT-PATTERNS-*` | Composition, component ownership, state structure |
| Consistency | `CONSISTENCY-*` | Platform checks, magic values, unused props, ESLint discipline, localization, file naming, JSDoc |
| Clean React Patterns | `CLEAN-REACT-PATTERNS-*` | Composition, component ownership, state structure, prop typing, function components |
| UI | `UI-*` | Loading indicators, scrollable pages, styling conventions |

## Quick Reference

Expand Down Expand Up @@ -42,6 +43,11 @@ Coding standards for the Expensify App. Each standard is a standalone file in `r
- [CONSISTENCY-4](rules/consistency-4-no-unused-props.md) — No unused props
- [CONSISTENCY-5](rules/consistency-5-justify-eslint-disable.md) — Justify ESLint disables
- [CONSISTENCY-6](rules/consistency-6-proper-error-handling.md) — Proper error handling
- [CONSISTENCY-7](rules/consistency-7-localize-copy.md) — Localize all user-visible copy
- [CONSISTENCY-8](rules/consistency-8-localize-numbers-dates.md) — Localize numbers, amounts, dates and phone numbers
- [CONSISTENCY-9](rules/consistency-9-file-naming.md) — Name files after what they export
- [CONSISTENCY-10](rules/consistency-10-jsdoc.md) — Follow the JSDoc style guidelines
- [CONSISTENCY-11](rules/consistency-11-no-todo-comments.md) — Track future work in an issue, not a TODO comment

### Clean React Patterns
- [CLEAN-REACT-PATTERNS-0](rules/clean-react-0-compiler.md) — React Compiler compliance
Expand All @@ -50,6 +56,15 @@ Coding standards for the Expensify App. Each standard is a standalone file in `r
- [CLEAN-REACT-PATTERNS-3](rules/clean-react-3-context-free-contracts.md) — Context-free component contracts
- [CLEAN-REACT-PATTERNS-4](rules/clean-react-4-no-side-effect-spaghetti.md) — No side-effect spaghetti
- [CLEAN-REACT-PATTERNS-5](rules/clean-react-5-narrow-state.md) — Keep state narrow
- [CLEAN-REACT-PATTERNS-6](rules/clean-react-6-no-componentprops.md) — Import the exported prop type instead of ComponentProps
- [CLEAN-REACT-PATTERNS-7](rules/clean-react-7-no-inline-prop-types.md) — Do not inline prop types on exported components
- [CLEAN-REACT-PATTERNS-8](rules/clean-react-8-no-class-components.md) — Use function components, not class components
- [CLEAN-REACT-PATTERNS-9](rules/clean-react-9-no-proptypes.md) — Use TypeScript types, not propTypes or defaultProps

### UI
- [UI-1](rules/ui-1-correct-loading-indicator.md) — Use the correct loading indicator based on navigation context
- [UI-2](rules/ui-2-new-page-scrollview.md) — New pages must be scrollable
- [UI-3](rules/ui-3-no-inline-styles.md) — Do not use inline style objects

## Usage

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
ruleId: CLEAN-REACT-6
ruleId: CLEAN-REACT-PATTERNS-6
title: Import the exported prop type instead of ComponentProps
---

## [CLEAN-REACT-6] Import the exported prop type instead of ComponentProps
## [CLEAN-REACT-PATTERNS-6] Import the exported prop type instead of ComponentProps

### Reasoning

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
ruleId: CLEAN-REACT-7
ruleId: CLEAN-REACT-PATTERNS-7
title: Do not inline prop types on exported components
---

## [CLEAN-REACT-7] Do not inline prop types on exported components
## [CLEAN-REACT-PATTERNS-7] Do not inline prop types on exported components

### Reasoning

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
ruleId: CLEAN-REACT-8
ruleId: CLEAN-REACT-PATTERNS-8
title: Use function components, not class components
---

## [CLEAN-REACT-8] Use function components, not class components
## [CLEAN-REACT-PATTERNS-8] Use function components, not class components

### Reasoning

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
ruleId: CLEAN-REACT-9
ruleId: CLEAN-REACT-PATTERNS-9
title: Use TypeScript types, not propTypes or defaultProps
---

## [CLEAN-REACT-9] Use TypeScript types, not propTypes or defaultProps
## [CLEAN-REACT-PATTERNS-9] Use TypeScript types, not propTypes or defaultProps

### Reasoning

Expand Down
Loading