Skip to content
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

[CAL-3087] Make linting rule disallowing use of Prisma includes using only "true" and not a field selector #13577

Closed
keithwillcode opened this issue Feb 7, 2024 · 2 comments · Fixed by #13652
Assignees
Labels
foundation Medium priority Created by Linear-GitHub Sync
Milestone

Comments

@keithwillcode
Copy link
Contributor

To ensure we only retrieve necessary data from the db and to protect unwanted data from crossing application boundaries.

Example:

include: {

user: true;

}

Should cause a linting error

From SyncLinear.com | CAL-3087

@keithwillcode keithwillcode added foundation High priority Created by Linear-GitHub Sync labels Feb 7, 2024
@keithwillcode keithwillcode added this to the v3.9 milestone Feb 7, 2024
@bandevedant
Copy link

Hello Keith , the above stuff can be solved by adding
rules: {
// Other rules...
'no-prisma-include-true': 'error', // Add the custom rule here
},
in cal.com/packages/config/eslint-preset.js Please correct me if I am wrong. I am ready to be assigned. Thank you.

@keithwillcode
Copy link
Contributor Author

@bandevedant no need to be assigned. Feel free to open a PR and we will review. Thanks!

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