Coding Standards
Last Verified: February 2026The Equa platform repositories use different toolchains that evolved independently. This guide documents the actual state of each repository’s coding standards rather than presenting an idealized unified standard.
Standards at a Glance
Source:
package.json and tsconfig.json files across repos
TSLint is deprecated and unmaintained. equa-web and equa-server still use it. An ESLint migration is recommended but has not been prioritized.
TypeScript Conventions
All repositories use TypeScript withstrict: true enabled. Common rules that apply everywhere:
- Avoid
any— Use proper typing. If a type is unknown, preferunknownand narrow it. - Prefer interfaces over type aliases for object shapes (consistency with existing code).
- Use
readonlyfor immutable properties where semantically appropriate.
equa-web / equa-server (CommonJS)
- Module system:
"module": "commonjs"in tsconfig - Decorators:
"experimentalDecorators": true— used by TypeORM entities in equa-server and some patterns in equa-web - Target: ES6 (equa-web), ES2019 (equa-server)
equa-web/tsconfig.json, equa-server/tsconfig.json
equabot-gateway (ESM)
- Module system:
"type": "module"in package.json - Target: Modern Node.js (22+)
- LOC guideline: Aim to keep files under ~500 lines; split/refactor when it improves clarity
- Strict typing enforced more aggressively than legacy repos
equabot-gateway/package.json, equabot/CLAUDE.md coding style section
React Patterns
equa-web (Mixed Legacy and Modern)
equa-web has code spanning several years. You’ll encounter two patterns: Legacy (older modules):- Class components with
React.Component - Redux for state management (
src/logic/contains the store) connected-react-routerfor routing with Redux integrationreact-final-formfor form handling
- Functional components with hooks (
useState,useEffect,useContext) - Local state preferred over Redux
- React Router 5 for routing
equa-patternlib / command-center-so (Modern)
- Functional components only
- React hooks for all state management
- No Redux
Styling
equa-web: styled-components 4.2
Components are styled using styled-components with a global ThemeProvider:equa-web/src/shared/styles/theme.ts. Always prefer theme variables over hardcoded values for colors, spacing, and typography.
Global CSS styles: equa-web/src/shared/styles/global.ts
Source: equa-web/README.md (lines 37-44)
equa-patternlib: styled-components 6.3
Same pattern but uses the newer styled-components API with React 18.command-center-so: Tailwind CSS 4
Uses utility-first CSS classes. No styled-components.Linting and Formatting
equa-web
equa-web/tslint.json extends tslint:recommended with Prettier integration.
Source: equa-web/package.json scripts
equa-server
equa-server/tslint.json uses tslint-config-prettier.
Source: equa-server/package.json scripts
equabot-gateway
pnpm lint before commits.
Source: equabot-gateway/package.json scripts
equa-patternlib / command-center-so
File Organization
Module Pattern (equa-web)
Each feature lives in its own module undersrc/modules/:
Workspace Module Pattern (equa-server)
Each module is a separate Yarn workspace package:api module registers all endpoint handlers. The persistence module owns all database entities and queries. Other modules reference persistence for data access.
Colocated Tests (equabot-gateway)
Tests live alongside the code they test:Naming Conventions
These are observed patterns, not enforced rules:Recommendations
- Migrate equa-web and equa-server from TSLint to ESLint — TSLint has been deprecated since 2019. ESLint with
@typescript-eslintis the modern standard. - Standardize on a single formatting tool — Currently a mix of Prettier (via TSLint), Oxfmt, and no formatter. Consider Prettier or Biome across all repos.
- Adopt consistent path aliases — equa-web has path aliases; equa-server does not. Consistent
@aliases would improve readability.