Skip to content

chore(tooling): repo-wide lint rollout #3

@tataihono

Description

@tataihono

Background

We need consistent code standards across the repo. Linting is currently inconsistent: only @forge/web has real lint (next lint); @forge/cms and @forge/ai-orchestrator use placeholders. Mobile (iOS/Android) has no lint configured. Generated clients must remain excluded per AGENTS.md.

Expected outcome

  • Single enforced lint baseline for all JS/TS/MJS code (apps/*, packages/*) with CI fail-on-error
  • Mobile lint (SwiftLint + ktlint/detekt) wired into CI
  • Generated client outputs excluded from lint scope

Acceptance criteria

  • Root ESLint flat config with explicit exclusion for packages/clients/** and build artifacts
  • All in-scope JS/TS/MJS workspaces have real lint scripts (replace placeholders in cms, ai-orchestrator)
  • pnpm lint deterministic and blocking; CI uses --max-warnings=0
  • SwiftLint config in mobile/ios/ and CI job; exclude generated Swift client
  • ktlint or detekt in mobile/android Gradle and CI; exclude generated Kotlin client
  • Lint commands documented in repo docs

Possible solution(s)

  1. ESLint (JS/TS): Single root eslint.config.mjs, flat config, TS parser. Keep next lint compatibility for web. Phase 1: baseline rules (syntax, undefined vars, unsafe async). Phase 2: stricter (import hygiene, no dead code).
  2. iOS: SwiftLint with .swiftlint.yml in mobile/ios/; CI job runs swiftlint (brew install).
  3. Android: ktlint (style) or detekt (style + complexity) via Gradle plugin; CI job runs ./gradlew ktlintCheck or detekt.

References

  • AGENTS.md (generated clients read-only)
  • .github/workflows/ci.yml (add mobile lint job)
  • packages/tooling/codegen/verify-generated.mjs (generated file stamp)

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions