Skip to content

chore: OXC - #7515

Open
diegolmello wants to merge 3 commits into
developfrom
political-catshark
Open

chore: OXC#7515
diegolmello wants to merge 3 commits into
developfrom
political-catshark

Conversation

@diegolmello

@diegolmello diegolmello commented Jul 24, 2026

Copy link
Copy Markdown
Member

Proposed changes

Issue(s)

How to test or reproduce

Screenshots

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • Improvement (non-breaking change which improves a current function)
  • New feature (non-breaking change which adds functionality)
  • Documentation update (if none of the other choices apply)

Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works (if applicable)
  • I have added necessary documentation (if applicable)
  • Any dependent changes have been merged and published in downstream modules

Further comments

Summary by CodeRabbit

  • Chores

    • Updated project code quality checks to use Oxlint and Oxfmt.
    • Added standardized formatting and linting configurations.
    • Updated automated workflows to run the new checks and apply formatting fixes.
  • Documentation

    • Updated contributor and development guidance with the new linting and formatting commands.
  • Bug Fixes

    • Corrected message list index fallback handling when a target message cannot be found.

Migrate linting from ESLint 8 to Oxlint. `pnpm lint` drops from ~1min to
~0.6s and 17 eslint packages are removed from devDependencies.

Config lives in `.oxlintrc.json`, generated with `@oxlint/migrate` from the
old `.eslintrc.js` and then tuned:

- `eslint-plugin-react-native` is loaded through `jsPlugins`, since Oxlint has
  no built-in equivalent.
- `import/extensions` is off. Its old options (`js: 'warning'`, ...) were not
  valid values for the rule, so it never reported anything under ESLint.
- `no-unused-vars` sets `caughtErrors: 'none'` to match the ESLint 8 default.
- `import/no-cycle` and the React Compiler rules report as warnings. They
  surface findings ESLint never showed, so they are not gated yet.

Rules with no Oxlint equivalent are dropped: `no-restricted-syntax` (the ban
on `React.*` member syntax), `import/order`, `import/no-unresolved` and
`import/named`.

ESLint 8 skipped dot-directories, so files under `.rnstorybook/` and
`.maestro/` were never linted. Oxlint does lint them, which surfaced four
violations that are fixed here.

The CI workflow keeps its filename and job id so branch protection checks
stay valid.
Migrate formatting from Prettier 2.8.8 to Oxfmt via `oxfmt --migrate prettier`.

- `.oxfmtrc.json` carries every previous Prettier option unchanged (tabs,
  single quotes, printWidth 130, no trailing comma, avoid arrow parens,
  bracketSameLine) plus the `.prettierignore` patterns as `ignorePatterns`.
  `sortPackageJson` is disabled to match previous behavior.
- `.prettierrc.js` and `.prettierignore` removed; `prettier` dropped from
  devDependencies.
- `prettier-lint` script renamed to `format-lint` and now runs `oxfmt`.
- 44 files reformatted: Oxfmt follows Prettier 3 style, so nested ternaries
  and `extends`/type-argument wrapping indent differently than under
  Prettier 2. No semantic changes.
- prettier.yml still ran `eslint --fix`, missed in the Oxlint migration; it
  now runs `oxfmt` and `oxlint --fix`. `react/exhaustive-deps` is allowed
  there because its autofix rewrites dependency arrays, which changes
  behavior and must not land unreviewed from CI.
- Workflow filename kept as prettier.yml to avoid disturbing branch
  protection checks, same as eslint.yml.

Verified: `pnpm lint` exit 0 (0 errors), `tsc` clean, 217/217 suites and
2032/2032 tests pass, `oxfmt --check` clean.
@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

The repository replaces ESLint and Prettier with Oxlint and Oxfmt, updates CI and documentation, and reformats source and test expressions. Two behavioral adjustments affect Maestro helper return handling and message-list index fallback evaluation.

Changes

Tooling migration

Layer / File(s) Summary
Tooling configuration
.oxlintrc.json, .oxfmtrc.json, package.json
Adds Oxlint/Oxfmt configuration and updates scripts and development dependencies.
CI and documentation wiring
.github/workflows/*, .github/README.md, CLAUDE.md, CONTRIBUTING.md
Updates workflow commands, labels, documentation, and formatting instructions for Oxlint and Oxfmt.

Code and test updates

Layer / File(s) Summary
Behavioral expression updates
.maestro/scripts/data-setup.js, app/views/RoomView/List/hooks/useScroll.ts
Makes deleteCreatedUser non-async and parenthesizes message-index fallback expressions.
Source syntax updates
.rnstorybook/*, app/containers/*, app/definitions/*, app/lib/*, app/views/*
Applies formatter-compatible imports, JSX, conditional expressions, and TypeScript type formatting.
Test syntax updates
app/**/__tests__/*, app/**/*.test.*, app/**/*.stories.*
Corrects or reformats test casts, JSX wrappers, mock constructors, and helper return expressions.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested labels: type: chore

Suggested reviewers: otaviostasiak

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title is related to the toolchain migration, but it is too vague to clearly convey the main change. Rename it to explicitly mention the ESLint/Prettier to Oxlint/Oxfmt migration, e.g. "chore: migrate linting and formatting to OXC".
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.oxlintrc.json:
- Line 3: Restore the complete intended plugin set in the root plugins
configuration at .oxlintrc.json:3, including the existing default plugins
alongside import, React, and Jest. Remove the TypeScript override plugins field
at .oxlintrc.json:90 so the override inherits the full root plugin set instead
of replacing it.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 00d54fd1-d8d2-45d7-86ea-44addfc4b1f7

📥 Commits

Reviewing files that changed from the base of the PR and between 1d9b5cc and 09685c7.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (60)
  • .eslintignore
  • .eslintrc.js
  • .github/README.md
  • .github/workflows/eslint.yml
  • .github/workflows/prettier.yml
  • .maestro/scripts/data-setup.js
  • .oxfmtrc.json
  • .oxlintrc.json
  • .prettierignore
  • .prettierrc.js
  • .rnstorybook/generateSnapshots.tsx
  • .rnstorybook/main.ts
  • .rnstorybook/preview.tsx
  • CLAUDE.md
  • CONTRIBUTING.md
  • app/containers/ActionSheet/ActionSheet.tsx
  • app/containers/CustomIcon/index.tsx
  • app/containers/LoginServices/LoginServices.test.tsx
  • app/containers/MessageComposer/MessageComposer.test.tsx
  • app/containers/MessageComposer/MessageComposer.tsx
  • app/containers/MessageComposer/hooks/useAutocomplete.ts
  • app/containers/NewMediaCall/VoipCallLifecycle.integration.test.tsx
  • app/containers/TextInput/FormTextInput.tsx
  • app/containers/UIKit/MessageBlock.tsx
  • app/containers/message/__tests__/index.test.tsx
  • app/containers/message/components/__tests__/Blocks.test.tsx
  • app/containers/message/components/__tests__/Content.test.tsx
  • app/containers/message/components/__tests__/Quote.test.tsx
  • app/containers/message/components/__tests__/RepliedThread.test.tsx
  • app/containers/message/components/__tests__/Reply.test.tsx
  • app/containers/message/components/__tests__/Thread.test.tsx
  • app/containers/message/hooks/__tests__/useMessageAccessibilityHint.test.tsx
  • app/containers/message/hooks/__tests__/useMessageAccessibilityLabel.test.tsx
  • app/containers/message/stores/__tests__/MessageStore.test.tsx
  • app/definitions/ILoggedUser.ts
  • app/definitions/ITeam.ts
  • app/definitions/rest/helpers/index.ts
  • app/definitions/utils.ts
  • app/lib/database/interfaces.ts
  • app/lib/methods/helpers/mergeSubscriptionsRooms.ts
  • app/lib/methods/loadMessagesForRoom.test.ts
  • app/lib/methods/roomTypeToApiType.ts
  • app/lib/methods/search.test.ts
  • app/lib/services/restApi.ts
  • app/lib/services/voip/MediaSessionInstance.test.ts
  • app/lib/services/voip/getPeerAutocompleteOptions.ts
  • app/reducers/login.ts
  • app/views/AddChannelTeamView.tsx
  • app/views/CannedResponsesListView/CannedResponseItem.tsx
  • app/views/ModalBlockView.tsx
  • app/views/RoomActionsView/components/CallSection.stories.tsx
  • app/views/RoomActionsView/components/CallSection.test.tsx
  • app/views/RoomInfoEditView/index.tsx
  • app/views/RoomInfoView/components/RoomInfoButtons.stories.tsx
  • app/views/RoomInfoView/components/RoomInfoButtons.test.tsx
  • app/views/RoomView/List/hooks/useMessages.test.tsx
  • app/views/RoomView/List/hooks/useScroll.ts
  • app/views/RoomView/List/index.tsx
  • app/views/RoomView/index.tsx
  • package.json
💤 Files with no reviewable changes (5)
  • .eslintignore
  • .prettierignore
  • .eslintrc.js
  • .prettierrc.js
  • .rnstorybook/preview.tsx
📜 Review details
⏰ Context from checks skipped due to timeout. (1)
  • GitHub Check: ESLint and Test / run-eslint-and-test
🧰 Additional context used
📓 Path-based instructions (6)
**/*.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{js,ts,jsx,tsx}: Use descriptive names for functions, variables, and classes that clearly convey their purpose
Write comments that explain the 'why' behind code decisions, not the 'what'
Keep functions small and focused on a single responsibility
Use const by default, let when reassignment is needed, and avoid var
Prefer async/await over .then() chains for handling asynchronous operations
Use explicit error handling with try/catch blocks for async operations
Avoid deeply nested code; refactor complex logic into helper functions

Files:

  • app/containers/message/hooks/__tests__/useMessageAccessibilityHint.test.tsx
  • app/containers/message/components/__tests__/Thread.test.tsx
  • app/definitions/utils.ts
  • app/views/CannedResponsesListView/CannedResponseItem.tsx
  • app/containers/message/components/__tests__/RepliedThread.test.tsx
  • app/views/RoomInfoEditView/index.tsx
  • app/lib/methods/loadMessagesForRoom.test.ts
  • app/containers/UIKit/MessageBlock.tsx
  • app/lib/methods/search.test.ts
  • app/containers/message/components/__tests__/Reply.test.tsx
  • app/views/RoomInfoView/components/RoomInfoButtons.stories.tsx
  • app/containers/message/components/__tests__/Quote.test.tsx
  • app/containers/MessageComposer/hooks/useAutocomplete.ts
  • app/containers/CustomIcon/index.tsx
  • app/containers/MessageComposer/MessageComposer.test.tsx
  • app/lib/methods/roomTypeToApiType.ts
  • app/containers/message/stores/__tests__/MessageStore.test.tsx
  • app/containers/LoginServices/LoginServices.test.tsx
  • app/containers/message/components/__tests__/Content.test.tsx
  • app/containers/TextInput/FormTextInput.tsx
  • app/views/RoomInfoView/components/RoomInfoButtons.test.tsx
  • app/lib/services/voip/MediaSessionInstance.test.ts
  • app/views/RoomView/List/hooks/useMessages.test.tsx
  • app/views/AddChannelTeamView.tsx
  • app/containers/message/components/__tests__/Blocks.test.tsx
  • app/views/RoomView/List/index.tsx
  • app/definitions/ILoggedUser.ts
  • app/lib/methods/helpers/mergeSubscriptionsRooms.ts
  • app/definitions/ITeam.ts
  • app/views/RoomView/index.tsx
  • app/lib/services/voip/getPeerAutocompleteOptions.ts
  • app/containers/MessageComposer/MessageComposer.tsx
  • app/lib/database/interfaces.ts
  • app/containers/ActionSheet/ActionSheet.tsx
  • app/views/RoomActionsView/components/CallSection.stories.tsx
  • app/reducers/login.ts
  • app/containers/message/hooks/__tests__/useMessageAccessibilityLabel.test.tsx
  • app/views/ModalBlockView.tsx
  • app/views/RoomActionsView/components/CallSection.test.tsx
  • app/containers/message/__tests__/index.test.tsx
  • app/definitions/rest/helpers/index.ts
  • app/containers/NewMediaCall/VoipCallLifecycle.integration.test.tsx
  • app/views/RoomView/List/hooks/useScroll.ts
  • app/lib/services/restApi.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx}: Use TypeScript for type safety; add explicit type annotations to function parameters and return types
Prefer interfaces over type aliases for defining object shapes in TypeScript
Use enums for sets of related constants rather than magic strings or numbers

**/*.{ts,tsx}: Use TypeScript strict mode for the React Native application.
Resolve application imports relative to app/, using the configured baseUrl where appropriate.
Use Redux and Redux-Saga for application state management; keep actions as plain action creators, reducers responsible for state shape, and sagas responsible for side effects.
Run the formatter/linter and tests for modified files before committing; pre-commit hooks enforce these checks.

Files:

  • app/containers/message/hooks/__tests__/useMessageAccessibilityHint.test.tsx
  • app/containers/message/components/__tests__/Thread.test.tsx
  • app/definitions/utils.ts
  • app/views/CannedResponsesListView/CannedResponseItem.tsx
  • app/containers/message/components/__tests__/RepliedThread.test.tsx
  • app/views/RoomInfoEditView/index.tsx
  • app/lib/methods/loadMessagesForRoom.test.ts
  • app/containers/UIKit/MessageBlock.tsx
  • app/lib/methods/search.test.ts
  • app/containers/message/components/__tests__/Reply.test.tsx
  • app/views/RoomInfoView/components/RoomInfoButtons.stories.tsx
  • app/containers/message/components/__tests__/Quote.test.tsx
  • app/containers/MessageComposer/hooks/useAutocomplete.ts
  • app/containers/CustomIcon/index.tsx
  • app/containers/MessageComposer/MessageComposer.test.tsx
  • app/lib/methods/roomTypeToApiType.ts
  • app/containers/message/stores/__tests__/MessageStore.test.tsx
  • app/containers/LoginServices/LoginServices.test.tsx
  • app/containers/message/components/__tests__/Content.test.tsx
  • app/containers/TextInput/FormTextInput.tsx
  • app/views/RoomInfoView/components/RoomInfoButtons.test.tsx
  • app/lib/services/voip/MediaSessionInstance.test.ts
  • app/views/RoomView/List/hooks/useMessages.test.tsx
  • app/views/AddChannelTeamView.tsx
  • app/containers/message/components/__tests__/Blocks.test.tsx
  • app/views/RoomView/List/index.tsx
  • app/definitions/ILoggedUser.ts
  • app/lib/methods/helpers/mergeSubscriptionsRooms.ts
  • app/definitions/ITeam.ts
  • app/views/RoomView/index.tsx
  • app/lib/services/voip/getPeerAutocompleteOptions.ts
  • app/containers/MessageComposer/MessageComposer.tsx
  • app/lib/database/interfaces.ts
  • app/containers/ActionSheet/ActionSheet.tsx
  • app/views/RoomActionsView/components/CallSection.stories.tsx
  • app/reducers/login.ts
  • app/containers/message/hooks/__tests__/useMessageAccessibilityLabel.test.tsx
  • app/views/ModalBlockView.tsx
  • app/views/RoomActionsView/components/CallSection.test.tsx
  • app/containers/message/__tests__/index.test.tsx
  • app/definitions/rest/helpers/index.ts
  • app/containers/NewMediaCall/VoipCallLifecycle.integration.test.tsx
  • app/views/RoomView/List/hooks/useScroll.ts
  • app/lib/services/restApi.ts
**/*.{ts,tsx,js,jsx,json}

📄 CodeRabbit inference engine (CLAUDE.md)

Follow Oxfmt formatting: tabs, single quotes, 130-character width, no trailing commas, omitted arrow-function parentheses where allowed, and same-line brackets.

Files:

  • app/containers/message/hooks/__tests__/useMessageAccessibilityHint.test.tsx
  • app/containers/message/components/__tests__/Thread.test.tsx
  • app/definitions/utils.ts
  • app/views/CannedResponsesListView/CannedResponseItem.tsx
  • app/containers/message/components/__tests__/RepliedThread.test.tsx
  • app/views/RoomInfoEditView/index.tsx
  • app/lib/methods/loadMessagesForRoom.test.ts
  • app/containers/UIKit/MessageBlock.tsx
  • app/lib/methods/search.test.ts
  • app/containers/message/components/__tests__/Reply.test.tsx
  • app/views/RoomInfoView/components/RoomInfoButtons.stories.tsx
  • app/containers/message/components/__tests__/Quote.test.tsx
  • app/containers/MessageComposer/hooks/useAutocomplete.ts
  • app/containers/CustomIcon/index.tsx
  • app/containers/MessageComposer/MessageComposer.test.tsx
  • app/lib/methods/roomTypeToApiType.ts
  • app/containers/message/stores/__tests__/MessageStore.test.tsx
  • app/containers/LoginServices/LoginServices.test.tsx
  • app/containers/message/components/__tests__/Content.test.tsx
  • app/containers/TextInput/FormTextInput.tsx
  • app/views/RoomInfoView/components/RoomInfoButtons.test.tsx
  • app/lib/services/voip/MediaSessionInstance.test.ts
  • app/views/RoomView/List/hooks/useMessages.test.tsx
  • app/views/AddChannelTeamView.tsx
  • app/containers/message/components/__tests__/Blocks.test.tsx
  • app/views/RoomView/List/index.tsx
  • app/definitions/ILoggedUser.ts
  • app/lib/methods/helpers/mergeSubscriptionsRooms.ts
  • app/definitions/ITeam.ts
  • app/views/RoomView/index.tsx
  • app/lib/services/voip/getPeerAutocompleteOptions.ts
  • app/containers/MessageComposer/MessageComposer.tsx
  • app/lib/database/interfaces.ts
  • app/containers/ActionSheet/ActionSheet.tsx
  • app/views/RoomActionsView/components/CallSection.stories.tsx
  • app/reducers/login.ts
  • app/containers/message/hooks/__tests__/useMessageAccessibilityLabel.test.tsx
  • app/views/ModalBlockView.tsx
  • app/views/RoomActionsView/components/CallSection.test.tsx
  • app/containers/message/__tests__/index.test.tsx
  • app/definitions/rest/helpers/index.ts
  • app/containers/NewMediaCall/VoipCallLifecycle.integration.test.tsx
  • app/views/RoomView/List/hooks/useScroll.ts
  • package.json
  • app/lib/services/restApi.ts
app/lib/services/voip/**/*.ts

📄 CodeRabbit inference engine (CLAUDE.md)

Implement VoIP using Zustand stores and native CallKit/Telecom integration; do not conflate VoIP with the Redux/Saga-based VideoConf feature.

Files:

  • app/lib/services/voip/MediaSessionInstance.test.ts
  • app/lib/services/voip/getPeerAutocompleteOptions.ts
app/lib/database/**/*.ts

📄 CodeRabbit inference engine (CLAUDE.md)

Use WatermelonDB for local database models and schema, maintaining the local-first approach where the UI reads from the database and sagas synchronize with the server.

Files:

  • app/lib/database/interfaces.ts
app/lib/services/restApi.ts

📄 CodeRabbit inference engine (CLAUDE.md)

Use fetch for HTTP REST API requests through the REST API service.

Files:

  • app/lib/services/restApi.ts
🧠 Learnings (8)
📚 Learning: 2026-04-30T17:07:51.020Z
Learnt from: diegolmello
Repo: RocketChat/Rocket.Chat.ReactNative PR: 7274
File: app/lib/services/voip/MediaCallEvents.ts:0-0
Timestamp: 2026-04-30T17:07:51.020Z
Learning: In this Rocket.Chat React Native codebase, the ESLint rule `no-void: error` is enforced. When you see a promise returned from an async call that is not awaited (a “floating promise”), do not silence it with the `void somePromise()` pattern. Instead, handle the promise explicitly by attaching `.catch(...)` (or otherwise awaiting/handling the error) so unhandled-rejection risks are addressed in a way that satisfies the existing ESLint configuration.

Applied to files:

  • app/containers/message/hooks/__tests__/useMessageAccessibilityHint.test.tsx
  • app/containers/message/components/__tests__/Thread.test.tsx
  • app/definitions/utils.ts
  • app/views/CannedResponsesListView/CannedResponseItem.tsx
  • app/containers/message/components/__tests__/RepliedThread.test.tsx
  • app/views/RoomInfoEditView/index.tsx
  • app/lib/methods/loadMessagesForRoom.test.ts
  • app/containers/UIKit/MessageBlock.tsx
  • app/lib/methods/search.test.ts
  • app/containers/message/components/__tests__/Reply.test.tsx
  • app/views/RoomInfoView/components/RoomInfoButtons.stories.tsx
  • app/containers/message/components/__tests__/Quote.test.tsx
  • app/containers/MessageComposer/hooks/useAutocomplete.ts
  • app/containers/CustomIcon/index.tsx
  • app/containers/MessageComposer/MessageComposer.test.tsx
  • app/lib/methods/roomTypeToApiType.ts
  • app/containers/message/stores/__tests__/MessageStore.test.tsx
  • app/containers/LoginServices/LoginServices.test.tsx
  • app/containers/message/components/__tests__/Content.test.tsx
  • app/containers/TextInput/FormTextInput.tsx
  • app/views/RoomInfoView/components/RoomInfoButtons.test.tsx
  • app/lib/services/voip/MediaSessionInstance.test.ts
  • app/views/RoomView/List/hooks/useMessages.test.tsx
  • app/views/AddChannelTeamView.tsx
  • app/containers/message/components/__tests__/Blocks.test.tsx
  • app/views/RoomView/List/index.tsx
  • app/definitions/ILoggedUser.ts
  • app/lib/methods/helpers/mergeSubscriptionsRooms.ts
  • app/definitions/ITeam.ts
  • app/views/RoomView/index.tsx
  • app/lib/services/voip/getPeerAutocompleteOptions.ts
  • app/containers/MessageComposer/MessageComposer.tsx
  • app/lib/database/interfaces.ts
  • app/containers/ActionSheet/ActionSheet.tsx
  • app/views/RoomActionsView/components/CallSection.stories.tsx
  • app/reducers/login.ts
  • app/containers/message/hooks/__tests__/useMessageAccessibilityLabel.test.tsx
  • app/views/ModalBlockView.tsx
  • app/views/RoomActionsView/components/CallSection.test.tsx
  • app/containers/message/__tests__/index.test.tsx
  • app/definitions/rest/helpers/index.ts
  • app/containers/NewMediaCall/VoipCallLifecycle.integration.test.tsx
  • app/views/RoomView/List/hooks/useScroll.ts
  • app/lib/services/restApi.ts
📚 Learning: 2026-06-25T18:37:25.526Z
Learnt from: diegolmello
Repo: RocketChat/Rocket.Chat.ReactNative PR: 7434
File: app/views/ScreenLockConfigView.test.tsx:16-22
Timestamp: 2026-06-25T18:37:25.526Z
Learning: In Rocket.Chat ReactNative tests that mock selectors for `useAppSelector`, don’t require the mocked selector input to be typed as `IApplicationState` when the fixture only includes a partial Redux state slice (e.g., only `server` and `settings`). Requiring the full `IApplicationState` type in that scenario forces unsafe `as IApplicationState` casts and undermines type-safety. For these narrowly scoped selector-mock fixtures, use a less strict type (e.g., `any`) to keep the mock focused on the slice under test.

Applied to files:

  • app/containers/message/hooks/__tests__/useMessageAccessibilityHint.test.tsx
  • app/containers/message/components/__tests__/Thread.test.tsx
  • app/containers/message/components/__tests__/RepliedThread.test.tsx
  • app/lib/methods/loadMessagesForRoom.test.ts
  • app/lib/methods/search.test.ts
  • app/containers/message/components/__tests__/Reply.test.tsx
  • app/containers/message/components/__tests__/Quote.test.tsx
  • app/containers/MessageComposer/MessageComposer.test.tsx
  • app/containers/message/stores/__tests__/MessageStore.test.tsx
  • app/containers/LoginServices/LoginServices.test.tsx
  • app/containers/message/components/__tests__/Content.test.tsx
  • app/views/RoomInfoView/components/RoomInfoButtons.test.tsx
  • app/lib/services/voip/MediaSessionInstance.test.ts
  • app/views/RoomView/List/hooks/useMessages.test.tsx
  • app/containers/message/components/__tests__/Blocks.test.tsx
  • app/containers/message/hooks/__tests__/useMessageAccessibilityLabel.test.tsx
  • app/views/RoomActionsView/components/CallSection.test.tsx
  • app/containers/message/__tests__/index.test.tsx
  • app/containers/NewMediaCall/VoipCallLifecycle.integration.test.tsx
📚 Learning: 2026-06-25T18:37:44.793Z
Learnt from: diegolmello
Repo: RocketChat/Rocket.Chat.ReactNative PR: 7434
File: app/views/ScreenLockConfigView.tsx:101-141
Timestamp: 2026-06-25T18:37:44.793Z
Learning: In the Rocket.Chat React Native codebase, do not treat passing an `async` function directly to an event prop in React/React Native UI components (e.g., `onPress={async () => ...}` in TSX) as a “floating promises” CI-blocking lint issue—this repo does not enable the ESLint `no-floating-promises` rule (while `no-void` is enforced). Only raise robustness follow-ups when there are genuinely unhandled promise paths (e.g., fire-and-forget calls like `save()` that return a Promise that is neither awaited nor handled), and prefer making sure failure paths are explicitly handled/reported rather than blocking on lint-style floating-promise concerns.

Applied to files:

  • app/containers/message/hooks/__tests__/useMessageAccessibilityHint.test.tsx
  • app/containers/message/components/__tests__/Thread.test.tsx
  • app/views/CannedResponsesListView/CannedResponseItem.tsx
  • app/containers/message/components/__tests__/RepliedThread.test.tsx
  • app/views/RoomInfoEditView/index.tsx
  • app/containers/UIKit/MessageBlock.tsx
  • app/containers/message/components/__tests__/Reply.test.tsx
  • app/views/RoomInfoView/components/RoomInfoButtons.stories.tsx
  • app/containers/message/components/__tests__/Quote.test.tsx
  • app/containers/CustomIcon/index.tsx
  • app/containers/MessageComposer/MessageComposer.test.tsx
  • app/containers/message/stores/__tests__/MessageStore.test.tsx
  • app/containers/LoginServices/LoginServices.test.tsx
  • app/containers/message/components/__tests__/Content.test.tsx
  • app/containers/TextInput/FormTextInput.tsx
  • app/views/RoomInfoView/components/RoomInfoButtons.test.tsx
  • app/views/RoomView/List/hooks/useMessages.test.tsx
  • app/views/AddChannelTeamView.tsx
  • app/containers/message/components/__tests__/Blocks.test.tsx
  • app/views/RoomView/List/index.tsx
  • app/views/RoomView/index.tsx
  • app/containers/MessageComposer/MessageComposer.tsx
  • app/containers/ActionSheet/ActionSheet.tsx
  • app/views/RoomActionsView/components/CallSection.stories.tsx
  • app/containers/message/hooks/__tests__/useMessageAccessibilityLabel.test.tsx
  • app/views/ModalBlockView.tsx
  • app/views/RoomActionsView/components/CallSection.test.tsx
  • app/containers/message/__tests__/index.test.tsx
  • app/containers/NewMediaCall/VoipCallLifecycle.integration.test.tsx
📚 Learning: 2026-06-24T22:58:43.390Z
Learnt from: Rohit3523
Repo: RocketChat/Rocket.Chat.ReactNative PR: 7157
File: app/views/MessagesView/index.tsx:392-392
Timestamp: 2026-06-24T22:58:43.390Z
Learning: When wrapping a React Native component (e.g., via `withSafeAreaInsets`) ensure `hoistNonReactStatics` is only required if the wrapped component actually defines static properties/methods that consumers rely on. If the component has no statics (as in `app/views/MessagesView/index.tsx`), you can omit `hoistNonReactStatics` for this case.

Applied to files:

  • app/views/CannedResponsesListView/CannedResponseItem.tsx
  • app/views/RoomInfoEditView/index.tsx
  • app/views/RoomInfoView/components/RoomInfoButtons.stories.tsx
  • app/views/RoomInfoView/components/RoomInfoButtons.test.tsx
  • app/views/RoomView/List/hooks/useMessages.test.tsx
  • app/views/AddChannelTeamView.tsx
  • app/views/RoomView/List/index.tsx
  • app/views/RoomView/index.tsx
  • app/views/RoomActionsView/components/CallSection.stories.tsx
  • app/views/ModalBlockView.tsx
  • app/views/RoomActionsView/components/CallSection.test.tsx
📚 Learning: 2026-03-15T13:55:42.038Z
Learnt from: Rohit3523
Repo: RocketChat/Rocket.Chat.ReactNative PR: 6911
File: app/containers/markdown/Markdown.stories.tsx:104-104
Timestamp: 2026-03-15T13:55:42.038Z
Learning: In Rocket.Chat React Native, the markdown parser requires a space between the underscore wrapping italic text and a mention sigil (_ mention _ instead of _mention_). Ensure stories and tests that include italic-wrapped mentions follow this form to guarantee proper parsing. Specifically, for files like app/containers/markdown/Markdown.stories.tsx, and any test/content strings that exercise italic-mentions, use the pattern _ mention _ (with spaces) to prevent the mention from being treated as plain text. Validate any test strings or story content accordingly.

Applied to files:

  • app/views/RoomInfoView/components/RoomInfoButtons.stories.tsx
  • app/views/RoomActionsView/components/CallSection.stories.tsx
📚 Learning: 2026-06-26T19:40:06.327Z
Learnt from: diegolmello
Repo: RocketChat/Rocket.Chat.ReactNative PR: 7449
File: app/containers/ActionSheet/useActionSheetItemHeight.ts:0-0
Timestamp: 2026-06-26T19:40:06.327Z
Learning: In Rocket.Chat’s React Native ActionSheet implementation, avoid introducing a dependency on the responsive-layout provider (useResponsiveLayout) for ActionSheet sizing. In ActionSheet-related files (e.g., app/containers/ActionSheet/useActionSheetItemHeight.ts), it’s acceptable to read `fontScale` directly from `useWindowDimensions()` when it would yield the identical value; only couple to `useResponsiveLayout` if `useWindowDimensions().fontScale` would differ and would affect sizing.

Applied to files:

  • app/containers/ActionSheet/ActionSheet.tsx
📚 Learning: 2026-02-05T13:55:00.974Z
Learnt from: Rohit3523
Repo: RocketChat/Rocket.Chat.ReactNative PR: 6930
File: package.json:101-101
Timestamp: 2026-02-05T13:55:00.974Z
Learning: In this repository, the dependency on react-native-image-crop-picker should reference the RocketChat fork (RocketChat/react-native-image-crop-picker) with explicit commit pins, not the upstream ivpusic/react-native-image-crop-picker. Update package.json dependencies (and any lockfile) to point to the fork URL and a specific commit, ensuring edge-to-edge Android fixes are included. This pattern should apply to all package.json files in the repo that declare this dependency.

Applied to files:

  • package.json
📚 Learning: 2026-05-07T17:47:14.516Z
Learnt from: diegolmello
Repo: RocketChat/Rocket.Chat.ReactNative PR: 7303
File: package.json:5-5
Timestamp: 2026-05-07T17:47:14.516Z
Learning: When reviewing pnpm `packageManager` version pins in any `package.json` (e.g., `"packageManager": "pnpm@<version>"`), don’t rely solely on web-search results to determine whether a version exists. For very recently published versions, cross-check the target version against the official pnpm release page (https://github.com/pnpm/pnpm/releases) and the npm registry page for pnpm (https://www.npmjs.com/package/pnpm) before flagging the pinned version as non-existent.

Applied to files:

  • package.json
🔇 Additional comments (47)
.maestro/scripts/data-setup.js (1)

73-73: LGTM!

app/views/RoomView/List/hooks/useScroll.ts (1)

154-154: LGTM!

Also applies to: 229-229

app/views/RoomInfoEditView/index.tsx (1)

457-457: LGTM!

app/containers/TextInput/FormTextInput.tsx (1)

176-180: LGTM!

.rnstorybook/generateSnapshots.tsx (1)

1-1: LGTM!

Also applies to: 17-17

app/containers/message/components/__tests__/Thread.test.tsx (1)

17-17: LGTM!

app/containers/message/hooks/__tests__/useMessageAccessibilityHint.test.tsx (1)

11-11: LGTM!

app/containers/message/hooks/__tests__/useMessageAccessibilityLabel.test.tsx (1)

27-27: LGTM!

app/lib/methods/loadMessagesForRoom.test.ts (1)

47-47: LGTM!

app/lib/methods/search.test.ts (1)

77-77: LGTM!

app/lib/services/voip/MediaSessionInstance.test.ts (1)

173-187: LGTM!

app/views/RoomActionsView/components/CallSection.stories.tsx (1)

46-46: LGTM!

app/views/RoomActionsView/components/CallSection.test.tsx (1)

79-79: LGTM!

app/views/RoomInfoView/components/RoomInfoButtons.stories.tsx (1)

46-46: LGTM!

app/views/RoomInfoView/components/RoomInfoButtons.test.tsx (1)

63-63: LGTM!

.rnstorybook/main.ts (1)

1-1: LGTM!

app/containers/ActionSheet/ActionSheet.tsx (1)

125-125: LGTM!

app/containers/CustomIcon/index.tsx (1)

17-17: LGTM!

app/containers/MessageComposer/MessageComposer.tsx (1)

117-117: LGTM!

app/containers/MessageComposer/hooks/useAutocomplete.ts (1)

31-33: LGTM!

app/containers/UIKit/MessageBlock.tsx (1)

4-8: LGTM!

app/definitions/ILoggedUser.ts (1)

33-36: LGTM!

app/definitions/ITeam.ts (1)

51-54: LGTM!

app/definitions/rest/helpers/index.ts (1)

7-10: LGTM!

Also applies to: 32-32, 52-57

app/containers/message/__tests__/index.test.tsx (1)

57-57: LGTM!

app/containers/message/components/__tests__/Blocks.test.tsx (1)

17-17: LGTM!

app/definitions/utils.ts (1)

18-20: LGTM!

app/lib/database/interfaces.ts (1)

27-50: LGTM!

Also applies to: 65-68

app/lib/methods/helpers/mergeSubscriptionsRooms.ts (1)

54-54: LGTM!

app/lib/methods/roomTypeToApiType.ts (1)

12-17: LGTM!

app/views/ModalBlockView.tsx (1)

163-170: LGTM!

app/views/RoomView/List/index.tsx (1)

60-60: LGTM!

app/views/RoomView/index.tsx (1)

1239-1239: LGTM!

app/containers/message/components/__tests__/Quote.test.tsx (1)

44-44: LGTM!

app/containers/message/components/__tests__/RepliedThread.test.tsx (1)

11-12: LGTM!

app/containers/message/components/__tests__/Reply.test.tsx (1)

48-53: LGTM!

app/lib/services/restApi.ts (1)

267-267: LGTM!

app/lib/services/voip/getPeerAutocompleteOptions.ts (1)

48-48: LGTM!

app/reducers/login.ts (1)

106-106: LGTM!

app/views/AddChannelTeamView.tsx (1)

74-78: LGTM!

app/views/CannedResponsesListView/CannedResponseItem.tsx (1)

55-55: LGTM!

app/containers/LoginServices/LoginServices.test.tsx (1)

42-42: LGTM!

app/containers/MessageComposer/MessageComposer.test.tsx (1)

95-95: LGTM!

app/containers/NewMediaCall/VoipCallLifecycle.integration.test.tsx (1)

219-270: LGTM!

app/containers/message/components/__tests__/Content.test.tsx (1)

51-51: LGTM!

app/containers/message/stores/__tests__/MessageStore.test.tsx (1)

166-172: LGTM!

app/views/RoomView/List/hooks/useMessages.test.tsx (1)

63-63: LGTM!

Comment thread .oxlintrc.json
@github-actions

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

iOS Build Available

Rocket.Chat 4.75.0.109410

@OtavioStasiak OtavioStasiak left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants