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.
This commit is contained in:
cyrus
2026-03-27 18:13:28 +05:30
parent c4b261529d
commit 5e29a5dddb
+6
View File
@@ -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.