Checks aren't catching deprecation warnings #11

Closed
opened 2026-08-27 10:41:22 +00:00 by uwayss · 4 comments
Owner

We should at least get a warning for these. I only see this in my IDE but the checks don't catch it:

'runOnJS' is deprecated.

screenshot:
image

We should at least get a warning for these. I only see this in my IDE but the checks don't catch it: ``` 'runOnJS' is deprecated. ``` screenshot: ![image](/attachments/944d741d-c076-4de0-8b87-0c12e8e94f1c)
Author
Owner

@claude work on a fix pls

@claude work on a fix pls
Collaborator

Pushed to claude/deprecation-warnings-11.

Summary

The root cause: tsc --noEmit never fails on @deprecated-tagged APIs — that's purely an editor/IDE hint — and eslint-config-expo's TypeScript rules don't include type-aware linting, so the @typescript-eslint/no-deprecated rule (which needs type info) was never active.

Fix (eslint.config.js): enabled type-aware linting for .ts/.tsx files via projectService: true and turned on @typescript-eslint/no-deprecated as a warn (consistent with the other rules in that config — it surfaces in npm run checks:lint output without failing the build, matching the "at least get a warning" ask).

Running this against the current codebase immediately caught two real deprecations (not the exact runOnJS one from the screenshot — that wasn't 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).

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

Pushed to `claude/deprecation-warnings-11`. ## Summary The root cause: `tsc --noEmit` never fails on `@deprecated`-tagged APIs — that's purely an editor/IDE hint — and `eslint-config-expo`'s TypeScript rules don't include type-aware linting, so the `@typescript-eslint/no-deprecated` rule (which needs type info) was never active. **Fix (`eslint.config.js`):** enabled type-aware linting for `.ts`/`.tsx` files via `projectService: true` and turned on `@typescript-eslint/no-deprecated` as a `warn` (consistent with the other rules in that config — it surfaces in `npm run checks:lint` output without failing the build, matching the "at least get a warning" ask). Running this against the current codebase immediately caught two real deprecations (not the exact `runOnJS` one from the screenshot — that wasn't 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). Verified `npm run checks:pr` (lint + tsc + format) passes clean with 0 errors/warnings after the fixes.
Author
Owner

@claude nice create a Pr i'll test it, fix a small thing and merge it

@claude nice create a Pr i'll test it, fix a small thing and merge it
Collaborator

The PR was created successfully. No file changes were needed on my end since the fix was already committed to claude/deprecation-warnings-11 by a previous run.

Summary

Opened PR #13: fix(lint): surface deprecation warnings in CI checks, from claude/deprecation-warnings-11 into main.

The branch already contained the fix from the earlier run:

  • eslint.config.js: enabled type-aware linting (projectService: true) for .ts/.tsx files and turned on @typescript-eslint/no-deprecated as a warn, so deprecated-API usage now surfaces in npm run checks:lint instead of only in the IDE.
  • SegmentedControl.tsx: replaced deprecated TouchableOpacity (from react-native-gesture-handler) with Pressable (from react-native).
  • NotificationsScreen.tsx: replaced DateTimePicker's deprecated onChange with onValueChange/onDismiss.

Branch was already up to date with main, so no new commits or pushes were needed — just the PR itself. Ready for you to test and merge.

The PR was created successfully. No file changes were needed on my end since the fix was already committed to `claude/deprecation-warnings-11` by a previous run. ## Summary Opened [PR #13](https://code.uwayss.com/uwayss/muhsin/pulls/13): `fix(lint): surface deprecation warnings in CI checks`, from `claude/deprecation-warnings-11` into `main`. The branch already contained the fix from the earlier run: - **`eslint.config.js`**: enabled type-aware linting (`projectService: true`) for `.ts`/`.tsx` files and turned on `@typescript-eslint/no-deprecated` as a `warn`, so deprecated-API usage now surfaces in `npm run checks:lint` instead of only in the IDE. - **`SegmentedControl.tsx`**: replaced deprecated `TouchableOpacity` (from `react-native-gesture-handler`) with `Pressable` (from `react-native`). - **`NotificationsScreen.tsx`**: replaced `DateTimePicker`'s deprecated `onChange` with `onValueChange`/`onDismiss`. Branch was already up to date with `main`, so no new commits or pushes were needed — just the PR itself. Ready for you to test and merge.
Sign in to join this conversation.
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#11
No description provided.