Skip to content

Conversation

@alumni
Copy link
Collaborator

@alumni alumni commented Oct 1, 2025

Description of change

Currently we set @typescript-eslint/no-unused-expressions to warn, which highlights a lot of errors in our chai assertions. When using both styles of assertion ("expect" and "should"), chai has side-effects which eslint is trying to prevent with this rule.

I disabled this rule for the assertions in the tests via eslint-plugin-chai-friendly, and set it to error in the rest of the code. I also corrected the remaining errors.

Before: 10807 warnings
After: 9207 warnings

Pull-Request Checklist

  • Code is up-to-date with the next branch
  • This pull request links relevant issues as Fixes #00000
  • There are new or updated unit tests validating the change
  • Documentation has been updated to reflect this change

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 1, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Oct 1, 2025

typeorm-sql-js-example

npm i https://pkg.pr.new/typeorm/typeorm@11700

commit: 5a35625

Copy link
Collaborator

@gioboa gioboa left a comment

Choose a reason for hiding this comment

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

Thanks @alumni 👏

@alumni
Copy link
Collaborator Author

alumni commented Oct 1, 2025

If we plan to merge more than a few PRs into master, we could also cherry pick this there, so we don't get more code like this later (although I think it's not very likely). Let me know if I should cherry pick.

@gioboa
Copy link
Collaborator

gioboa commented Oct 1, 2025

I think we can merge it straight to master 👀

@alumni
Copy link
Collaborator Author

alumni commented Oct 1, 2025

And then sync next with master? We could do that too. 🤷🏻‍♂️

I'm more tempted to only do the strictly necessary for 0.3, I'd rather not put much effort into something that will be obsolete by the end of the year :)

@coveralls
Copy link

Coverage Status

coverage: 76.411% (-0.03%) from 76.442%
when pulling 5a35625 on alumni:chore/eslint-chai-friendly
into a7c387b on typeorm:next.

@alumni alumni merged commit b1680a0 into typeorm:next Oct 1, 2025
60 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants