Skip to content

[Backend Cleanup] Fix ESLint Issues in apps/backend/src/routes/cards.ts #175

@Harxhit

Description

@Harxhit

Title

[Backend Cleanup] Fix ESLint Issues in apps/backend/src/routes/cards.ts

Summary

Fix ESLint and code-quality issues in apps/backend/src/routes/cards.ts to align the file with the backend linting standards and improve maintainability.

This issue is part of the ongoing backend cleanup effort and focuses only on lint and formatting improvements without changing card logic, API behavior, or application functionality.

Contexts

The backend currently contains multiple ESLint violations across several route files. To keep reviews manageable and avoid large cleanup PRs, this issue is intentionally scoped to a single route file:

apps/backend/src/routes/cards.ts

Current lint issues reported for this file include:

  • Import ordering issues
  • Missing spacing between import groups
  • Missing explicit return types
  • Unused reply parameter
  • Minor lint cleanup

Examples from current lint output:

  • import-x/order
  • @typescript-eslint/explicit-function-return-type
  • @typescript-eslint/no-unused-vars

This issue is strictly meant to improve code quality while keeping the PR small, focused, and easy to review.

File Scope

This issue is intentionally restricted to:

apps/backend/src/routes/cards.ts

No other files should be modified as part of this issue.

Important Note

This is a strictly scoped cleanup issue.

Please do not run global lint fixes such as:

eslint . --fix
pnpm lint --fix

Only fix issues related to:

apps/backend/src/routes/cards.ts

PRs containing unrelated file changes or repository-wide lint fixes may be requested for revision.

Scope Restrictions

Please follow these restrictions carefully.

Allowed

You may:

  • Fix ESLint issues in cards.ts
  • Resolve import ordering issues
  • Add proper spacing between imports
  • Add explicit return types where required
  • Resolve unused parameter warnings
  • Perform minimal lint-related formatting required for this file

Not Allowed

Please do not:

  • Modify any other route files
  • Modify Prisma schema or migration files
  • Modify card business logic
  • Change API request or response behavior
  • Refactor unrelated backend code
  • Add new features or endpoints
  • Modify tests unless directly required for this file
  • Submit broad backend lint cleanup touching multiple files

PRs containing unrelated changes may be requested for revision.

Tasks

  • Review lint issues affecting apps/backend/src/routes/cards.ts
  • Fix import-x/order issues
  • Add proper spacing between import groups
  • Add missing explicit return types
  • Resolve unused reply parameter warning
  • Keep changes limited strictly to cards.ts
  • Verify no runtime or API behavior changes are introduced
  • Run lint verification before submitting PR

Acceptance Criteria

  • Only apps/backend/src/routes/cards.ts is modified
  • apps/backend/src/routes/cards.ts passes ESLint without errors
  • No card logic or API behavior is changed
  • No unrelated backend files are modified
  • Changes remain limited to lint and code-quality cleanup
  • PR includes pnpm lint proof (terminal output or screenshot)

Verification

Before submitting the PR, run:

pnpm lint

Attach terminal output or screenshot showing lint proof for this file.

Area

backend

Labels

cleanup backend good-first-issue

Difficulty

easy

Metadata

Metadata

Labels

cleanupCode cleanup, lint fixes, refactoring, and maintenance-related changes.good-first-issueGood for newcomers

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions