Refactor: unused parameter conventions, import alias clarity, null safety, and DRY helpers#406
Draft
Refactor: unused parameter conventions, import alias clarity, null safety, and DRY helpers#406
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…nd code quality issues Agent-Logs-Url: https://github.com/CodeStorm-Hub/stormcomui/sessions/d0a6481e-19b4-41f9-8917-b4a1b828ada7 Co-authored-by: syed-reza98 <71028588+syed-reza98@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix unused variable warnings for user parameter
Refactor: unused parameter conventions, import alias clarity, null safety, and DRY helpers
Mar 31, 2026
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.
Several code quality issues across inventory, landing page, and subscription modules:
void paramanti-pattern, a confusing import alias shadowing a local function, unsafeas Promise<T>casts, and duplicated date math.src/app/api/inventory/route.tsvoid user;suppression with_usernaming convention inhandleConfirm,handleRelease,handleChecksrc/lib/services/landing-page-service.tssanitizeRichHtml→sanitizeRichTextFromXssProtectionto eliminate ambiguity with the localsanitizeRichTextwrapperMAX_RICH_TEXT_LENGTH = 10_000constant to replace inline magic numberas Promise<LandingPageDetail>unsafe casts with explicitawait+ null checks:src/lib/subscription/feature-enforcer.tsFeatureFlagtype alias replacing the verbosekeyof Pick<FeatureLimits, '...' | '...'>signature incanUseFeature; also narrowsfeatureNamesrecord toRecord<FeatureFlag, string>getStartOfMonth()helper eliminating identical 3-line date setup duplicated incanCreateOrderandgetUsageStatssrc/test/services/search.service.test.tsMock elasticsearch client→Mock search engine clientOriginal prompt