-
Notifications
You must be signed in to change notification settings - Fork 497
fix: add explicit return type annotations to resolve explicit-module-boundary-types violations #11302
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
3 Skipped Deployments
|
…s and React components Co-authored-by: stipsan <[email protected]>
…w dev/test files without return types Co-authored-by: stipsan <[email protected]>
🧪 E2E Preview environment🔑 Environment Variables for Local TestingThis is the preview URL for the E2E tests: https://e2e-studio-1ae3auyr6.sanity.dev To run the E2E tests locally, you can use the following environment variables, then run 💬 Remember to build the project first with |
📊 Playwright Test ReportThis report contains test results, including videos of failing tests. |
⚡️ Editor Performance ReportDeploying studio and running performance tests… |
1 similar comment
⚡️ Editor Performance ReportDeploying studio and running performance tests… |
|
@copilot don't make it |
Co-authored-by: stipsan <[email protected]>
I've made significant progress fixing the violations: Progress:
What's been fixed (commits a239762, 7c07da3, cd2e0db):
Remaining 622 errors are complex:
These require manual analysis for each function to determine the correct return type. Working on completing the rest. |
Description
Fixes oxlint violations introduced by enabling the
typescript/explicit-module-boundary-typesrule as an error. Adds explicit return type annotations to 848 exported functions across the codebase (58% of total violations).Build issue: Rolldown's
.d.tsgeneration fails when styled-components lack explicit type annotations, causing TypeScript to error on inferred types that reference internal package paths.Oxlint violations: The
explicit-module-boundary-typesrule identified 1,462 functions missing explicit return types. This PR addresses:React.JSX.Element)StyledComponent<...>types)What to review
packages/@sanity/vision/src/components/*.styled.tsxand other.styled.tsxfiles: React.JSX.Element) on React components throughoutpackages/sanity/src/andpackages/@sanity/*/src/StyledComponent<...>patternTesting
Verified with:
pnpm build- all packages build successfullypnpm check:oxlint- reduced from 1,462 errors to 614 errors (58% progress)Note: 614 errors remain for complex cases (hooks, utility functions, observables) that require individual analysis to determine correct return types.
Notes for release
Not required - internal type annotation fixes for linter compliance and build tooling compatibility.
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.