Skip to content

Comments

chore: add an eslint warning for prisma default export#24031

Closed
hbjORbj wants to merge 1 commit intomainfrom
chore/eslint-rule-for-named-export
Closed

chore: add an eslint warning for prisma default export#24031
hbjORbj wants to merge 1 commit intomainfrom
chore/eslint-rule-for-named-export

Conversation

@hbjORbj
Copy link
Contributor

@hbjORbj hbjORbj commented Sep 24, 2025

What does this PR do?

  • Add an eslint warning for prisma default export

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • N/A - I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. If N/A, write N/A here and check the checkbox.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

  • Please use the latest Vercel preview and test please 🙏.

@vercel
Copy link

vercel bot commented Sep 24, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
cal Ignored Ignored Sep 24, 2025 8:59am

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 24, 2025

Walkthrough

Updates the root ESLint configuration (.eslintrc.js) by adding a new global override for all TS/TSX/JS/JSX files that forbids default imports from @calcom/prisma and instructs using the named import { prisma }. Introduces a labeled section grouping existing circular-dependency-related overrides without changing their rules. Reorders override blocks to accommodate the new grouping and the global no-restricted-imports rule. No application/runtime code is changed.

Possibly related PRs

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
Title Check ✅ Passed The title concisely identifies the primary change: adding an ESLint rule that targets the Prisma default export. This aligns with the .eslintrc.js changes which add a global no-restricted-imports rule for @calcom/prisma. The only minor inaccuracy is the word "warning" in the title while the rule is configured as an "error", but that does not make the title misleading.
Description Check ✅ Passed The PR description states it adds an ESLint warning for the Prisma default export, which directly matches the .eslintrc.js changes that introduce a no-restricted-imports rule preventing default imports from @calcom/prisma, so the description is on-topic and describes the changeset.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/eslint-rule-for-named-export

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.

@graphite-app graphite-app bot requested review from a team September 24, 2025 08:59
@hbjORbj hbjORbj changed the title chore: eslint rule for named export chore: add an eslint warning for prisma default export Sep 24, 2025
@keithwillcode keithwillcode added core area: core, team members only foundation labels Sep 24, 2025
@hbjORbj hbjORbj enabled auto-merge (squash) September 24, 2025 09:00
],
},
},
/* Rules to prevent circular dependencies ends here */
Copy link
Contributor Author

Choose a reason for hiding this comment

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

just organizing rules :)

Copy link
Contributor

@emrysal emrysal left a comment

Choose a reason for hiding this comment

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

LGTM

@hbjORbj hbjORbj closed this Sep 24, 2025
auto-merge was automatically disabled September 24, 2025 14:16

Pull request was closed

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.

3 participants