fix(lint): surface deprecation warnings in CI checks #13

Merged
uwayss merged 1 commit from claude/deprecation-warnings-11 into main 2026-08-27 11:50:02 +00:00

Closes #11

Problem

tsc --noEmit never fails on @deprecated-tagged APIs (its a pure editor hint), and eslint-config-expo's TypeScript rules dont include type-aware linting, so @typescript-eslint/no-deprecated (which needs type info) was never active. Deprecation warnings like 'runOnJS' is deprecated. only showed up in the IDE, never in npm run checks:*.

Fix

  • eslint.config.js: enabled type-aware linting for .ts/.tsx via projectService: true, and turned on @typescript-eslint/no-deprecated as a warn (matches severity of the other rules in that config, so it surfaces without failing the build).

Running this against the current codebase caught two real deprecations already present (different from the runOnJS one in the screenshot, which is not present in this code, but the same class of problem):

  • SegmentedControl.tsx: TouchableOpacity from react-native-gesture-handler is deprecated → switched to Pressable from react-native.
  • NotificationsScreen.tsx: DateTimePicker's onChange prop is deprecated → split into onValueChange (applies the selected time) and onDismiss (closes the picker without a change).

npm run checks:pr (lint + tsc + format) passes clean with 0 errors/warnings.

Closes #11 ## Problem `tsc --noEmit` never fails on `@deprecated`-tagged APIs (its a pure editor hint), and `eslint-config-expo`'s TypeScript rules dont include type-aware linting, so `@typescript-eslint/no-deprecated` (which needs type info) was never active. Deprecation warnings like `'runOnJS' is deprecated.` only showed up in the IDE, never in `npm run checks:*`. ## Fix - `eslint.config.js`: enabled type-aware linting for `.ts`/`.tsx` via `projectService: true`, and turned on `@typescript-eslint/no-deprecated` as a `warn` (matches severity of the other rules in that config, so it surfaces without failing the build). Running this against the current codebase caught two real deprecations already present (different from the `runOnJS` one in the screenshot, which is not present in this code, but the same class of problem): - `SegmentedControl.tsx`: `TouchableOpacity` from `react-native-gesture-handler` is deprecated → switched to `Pressable` from `react-native`. - `NotificationsScreen.tsx`: `DateTimePicker`'s `onChange` prop is deprecated → split into `onValueChange` (applies the selected time) and `onDismiss` (closes the picker without a change). `npm run checks:pr` (lint + tsc + format) passes clean with 0 errors/warnings.
tsc only flags @deprecated usages in editors, never in `tsc --noEmit`,
so checks:ci silently let them through. Enable typed linting for
@typescript-eslint/no-deprecated so `expo lint` warns on them, and fix
the two deprecations it caught: TouchableOpacity from
react-native-gesture-handler (use Pressable) and DateTimePicker's
onChange prop (use onValueChange/onDismiss).

Closes #11

Co-Authored-By: Claude <noreply@anthropic.com>
uwayss force-pushed claude/deprecation-warnings-11 from 8f2c840cd1 to a1c72f0f3a
All checks were successful
Checks / checks (pull_request) Successful in 25s
2026-08-27 11:46:12 +00:00
Compare
uwayss merged commit 979d0a1874 into main 2026-08-27 11:50:02 +00:00
uwayss deleted branch claude/deprecation-warnings-11 2026-08-27 11:50:02 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
uwayss/muhsin!13
No description provided.