Skip to content

fix: remove deprecated @ts-ignore in federation-matrix#38557

Open
mdawoud27 wants to merge 1 commit into
RocketChat:developfrom
mdawoud27:fix/application-lint
Open

fix: remove deprecated @ts-ignore in federation-matrix#38557
mdawoud27 wants to merge 1 commit into
RocketChat:developfrom
mdawoud27:fix/application-lint

Conversation

@mdawoud27
Copy link
Copy Markdown
Contributor

@mdawoud27 mdawoud27 commented Feb 8, 2026

Proposed changes (including videos or screenshots)

Improved type safety in @rocket.chat/federation-matrix by removing deprecated @ts-ignore comments and fixing a non-null assertion.

Issue(s)

N/A

Steps to test or reproduce

  • Run lint to verify warnings are fixed:

     yarn lint

    Expected result: Exit code 0, no warnings (previously had 7 warnings)

  • Run tests to ensure no functionality broke

    yarn testunit

    Expected result: All 82 tests pass

Summary by CodeRabbit

  • Chores

    • Removed development ignore comments from validation declarations to improve type-checking and code quality during builds.
  • Tests

    • Improved end-to-end test robustness by adding conditional safety checks to avoid potential runtime failures when expected test data is absent.

@dionisio-bot
Copy link
Copy Markdown
Contributor

dionisio-bot Bot commented Feb 8, 2026

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is missing the 'stat: QA assured' label
  • This PR is missing the required milestone or project

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Feb 8, 2026

⚠️ No Changeset found

Latest commit: 1579c59

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 8, 2026

Walkthrough

Removed TypeScript ignore directives from AJV validator declarations in two federation Matrix API files and made a test safer by replacing a non-null assertion with a conditional guard.

Changes

Cohort / File(s) Summary
Directive removals (validators)
ee/packages/federation-matrix/src/api/_matrix/profiles.ts, ee/packages/federation-matrix/src/api/_matrix/send-join.ts
Removed // @ts-ignore`` pragmas preceding AJV-compiled validator variables (three instances per file), restoring TypeScript-level checking on those declarations.
Test safety
ee/packages/federation-matrix/tests/end-to-end/dms.spec.ts
Replaced a direct non-null assertion on room with a conditional guard before accessing room.getMyMembership(), avoiding potential runtime errors when room is undefined.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 I hopped through code with curious eyes,
I nudged the ignores to let TypeScript rise.
A guarded room now snug and neat,
No surprised errors for me to meet. 🥕✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: removing deprecated @ts-ignore comments from federation-matrix package files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

📝 Coding Plan
  • Generate coding plan for human review comments

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 and usage tips.

Tip

CodeRabbit can generate a title for your PR based on the changes with custom instructions.

Set the reviews.auto_title_instructions setting to generate a title for your PR based on the changes in the PR with custom instructions.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

No issues found across 3 files

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.

1 participant