Skip to content

chore(yup): use configureYup method and use yup module imports#179

Merged
TheMaskedTurtle merged 3 commits into
mainfrom
jorism/chore/yup-usage
May 29, 2026
Merged

chore(yup): use configureYup method and use yup module imports#179
TheMaskedTurtle merged 3 commits into
mainfrom
jorism/chore/yup-usage

Conversation

@TheMaskedTurtle
Copy link
Copy Markdown
Contributor

PR Summary

…onfiguration initialization

Signed-off-by: Joris Mancini <joris.mancini_externe@rte-france.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 29, 2026

Review Change Stack

Warning

Review limit reached

@TheMaskedTurtle, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 59 minutes and 57 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d7ddbe8f-245c-4875-8ded-8aa0bacb8f1b

📥 Commits

Reviewing files that changed from the base of the PR and between 1814169 and 428a815.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (3)
  • jest.config.ts
  • package.json
  • src/configure-yup-init.ts
📝 Walkthrough

Walkthrough

The PR centralizes Yup schema configuration and migrates all form validation imports. A new initialization module runs configureYup() at startup to apply locale settings. All form schemas then import yup directly instead of using the re-exported yupConfig from commons-ui, with schema type inference updated to use the direct Yup import.

Changes

Yup import and configuration migration

Layer / File(s) Summary
Yup initialization setup
src/configure-yup-init.ts, src/index.tsx
New configure-yup-init module imports and invokes configureYup() immediately; the module is imported at application entrypoint before app rendering.
Form schemas updated to direct yup imports
src/pages/announcements/add-announcement-form.tsx, src/pages/groups/modification/group-modification-form.tsx, src/pages/profiles/modification/profile-modification-dialog.tsx, src/pages/users/modification/user-modification-form.tsx
Validation schemas across all forms now import yup directly from the yup package; imports from @gridsuite/commons-ui are simplified to remove yupConfig and keep only UI/utility imports; schema type inference updated to use yup.InferType<typeof formSchema>.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is empty, providing no information about the changeset. Add a description explaining the purpose of switching to configureYup and direct yup imports, and any benefits or migration notes for reviewers.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main changes: introducing configureYup for global Yup configuration and switching to direct yup module imports throughout the codebase.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/pages/announcements/add-announcement-form.tsx`:
- Line 23: The import of YUP_REQUIRED from `@gridsuite/commons-ui` is invalid in
this release; update the import in add-announcement-form.tsx (currently at the
top import line and where YUP_REQUIRED is used around line 44) to the actual
module that exports it (e.g., import YUP_REQUIRED from its specific path inside
`@gridsuite/commons-ui/dist/`... or the correct subpath the package provides) or
alternatively upgrade `@gridsuite/commons-ui` to a version that re-exports
YUP_REQUIRED from the package root; ensure you update the import statement
referencing YUP_REQUIRED and any usages in the file to match the new import
location.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: cc71b5b3-fdf8-4363-9fff-0f624e192197

📥 Commits

Reviewing files that changed from the base of the PR and between 16ccc2e and 1814169.

📒 Files selected for processing (6)
  • src/configure-yup-init.ts
  • src/index.tsx
  • src/pages/announcements/add-announcement-form.tsx
  • src/pages/groups/modification/group-modification-form.tsx
  • src/pages/profiles/modification/profile-modification-dialog.tsx
  • src/pages/users/modification/user-modification-form.tsx

Comment thread src/pages/announcements/add-announcement-form.tsx
Signed-off-by: Joris Mancini <joris.mancini_externe@rte-france.com>
Signed-off-by: Joris Mancini <joris.mancini_externe@rte-france.com>
@sonarqubecloud
Copy link
Copy Markdown

@TheMaskedTurtle TheMaskedTurtle merged commit 3c3bd6d into main May 29, 2026
6 checks passed
@TheMaskedTurtle TheMaskedTurtle deleted the jorism/chore/yup-usage branch May 29, 2026 15:15
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.

2 participants