Skip to content

[Tooling] ESLint config has no TypeScript-specific rules — no-floating-promises, strict-boolean-expressions are missing #93

Description

@cybermax4200

Why this matters now: .eslintrc.js extends @react-native which includes basic React Native rules but no @typescript-eslint/* rules. This means unchecked promise rejections (no-floating-promises), unsafe boolean coercions, and other TypeScript-specific anti-patterns are invisible to the linter. The codebase already has several instances of unchecked async calls (e.g., authenticate(publicKey).catch(() => {}) in OnboardingScreen.tsx:33).

Problem / What: .eslintrc.js — extends @react-native only. No plugin:@typescript-eslint/recommended or plugin:@typescript-eslint/stylistic. Missing rules:

  • @typescript-eslint/no-floating-promises — catches unhandled promise rejections.
  • @typescript-eslint/strict-boolean-expressions — prevents implicit truthy checks on non-boolean values.
  • @typescript-eslint/no-misused-promises — prevents passing async functions where sync is expected.
  • @typescript-eslint/await-thenable — catches await on non-thenables.

Key Challenges:

  • Add plugin:@typescript-eslint/recommended and plugin:@typescript-eslint/stylistic to extends.
  • Fix all resulting lint errors (there will be many — the codebase has numerous unchecked promises and any-typed boolean checks).
  • no-floating-promises will flag every authenticate(...).catch(...) pattern and every unhandled submitProof(...) call.
  • This is a cross-cutting change that touches most files.

Acceptance Criteria:

Relevant files/functions:

  • .eslintrc.js
  • All source files (lint errors will surface across the codebase)

Out of scope: Prettier config changes, import ordering rules.

Labels: tooling, advanced, quality

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions