From 5e29a5dddbdd1a7d357b95a0b65727ec51870d85 Mon Sep 17 00:00:00 2001 From: cyrus Date: Fri, 27 Mar 2026 18:13:28 +0530 Subject: [PATCH] docs: add mandatory pre-completion checks to contribution guidelines - Included formatting, linting, and compilation checks for JavaScript and Rust. - Specified tools and commands for verifying code quality before marking tasks complete. --- CLAUDE.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index 79de7a705..49f8bbc96 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -471,6 +471,12 @@ Key updates from recent commits (cd9ebcd to current): ## Key Patterns +- **MANDATORY: Pre-completion checks**: Before considering ANY task complete, ALWAYS run these checks and fix all errors: + 1. `npx prettier --check .` (formatting) + 2. `npx eslint .` (lint) + 3. `npx tsc --noEmit` (TypeScript) + 4. `cargo fmt --manifest-path src-tauri/Cargo.toml` (Rust formatting, if Rust files were changed) + 5. `cargo check --manifest-path src-tauri/Cargo.toml` (Rust compilation, if Rust files were changed) - **Code Quality**: ESLint and Prettier enforce code standards with Husky hooks. Use type-only imports (`import type`) and consolidate imports from same modules. - **No dynamic imports**: All imports must be static `import` statements at the top of the file. Do not use `await import()` or `import().then()` inside functions or code blocks. Use try/catch around Tauri API calls for non-Tauri environments instead. - **No localStorage**: Avoid `localStorage` and `sessionStorage`; use Redux (and persist) for app state. Remove any direct usage when working on affected code.