New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add linting rule to recursively check for Prisma includes using… #13652
Conversation
@Nis-Han is attempting to deploy a commit to the cal Team on Vercel. A member of the Team first needs to authorize it. |
Thank you for following the naming conventions! 🙏 Feel free to join our discord and post your PR link. |
📦 Next.js Bundle Analysis for @calcom/webThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
We have a lot of places breaking this rule currently. Putting this in draft while we 1. clean them up or 2. add eslint ignore for now |
This PR is being marked as stale due to inactivity. |
This PR is being marked as stale due to inactivity. |
This PR is being marked as stale due to inactivity. |
… only 'true'
Implements #13577
What does this PR do?
Implements a linting rule that dissallows use of Prisma includes using only "true" and not a field selector.
It recursively checks for
include
parameters in Prisma query arguments so that even nested includes are checked.If property is found and has a sub property with value as true, it will report an error.
Fixes #13577
https://www.loom.com/share/afb63c3348ce48ae976c129f66c6f10b?sid=6897eeb6-47bc-46b9-b632-6550d2518368
Error Example:
Requirement/Documentation
Type of change
How should this be tested?
Pull the branch and try to voilate the rule, see if there is some error or not.
Mandatory Tasks
Checklist