feat: Add linting rule to recursively check for Prisma includes using…#13652
Merged
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. |
Contributor
|
Thank you for following the naming conventions! 🙏 Feel free to join our discord and post your PR link. |
Contributor
📦 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! 🙌 |
1 task
Contributor
|
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 |
Contributor
|
This PR is being marked as stale due to inactivity. |
Contributor
|
This PR is being marked as stale due to inactivity. |
Contributor
|
This PR is being marked as stale due to inactivity. |
keithwillcode
approved these changes
Apr 26, 2024
p6l-richard
pushed a commit
to p6l-richard/cal.com-fork
that referenced
this pull request
Jul 22, 2024
calcom#13652) * feat: Add linting rule to recursively check for Prisma includes using only 'true' * Fixing linting errors * More linting fixes * Disabled linting for forms * Update recommended.ts * Removed ignores * Fixed warning * Type fix --------- Co-authored-by: Keith Williams <keithwillcode@gmail.com>
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
… 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
includeparameters 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