We use opinionated formatters to ensure consistent code style across the codebase—backend, frontend, and tests.
All Python files (backend and tests) are auto-formatted using:
- autoflake – Removes unused imports and variables.
- isort – Sorts and groups imports.
- black – Formats Python code to a consistent style.
npm run fmt:pyThis will recursively format everything under src/ and tests/.
Test files have a separate configuration in:
tests/pyproject.toml
For JavaScript and TypeScript files, we use Prettier.
npm run fmt:tsWe use lint-staged to format staged files automatically before a commit.
- Runs
black,isort, andautoflakefor staged.pyfiles. - Runs
prettierfor staged.js,.ts,.tsx,.json, etc.