-
Notifications
You must be signed in to change notification settings - Fork 15
feat: reducing amount of issues reported by svelte check from 95 to 68 #439
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
feat: reducing amount of issues reported by svelte check from 95 to 68 #439
Conversation
|
/review |
commit 6d20974 Author: Kondrat Shmoylov <kondrat.shmoylov@gmail.com> Date: Tue Jan 20 14:59:16 2026 +0100 update commit b53603f Merge: 70a37ed 4cefe86 Author: Kondrat Shmoylov <kondrat.shmoylov@gmail.com> Date: Tue Jan 20 14:58:57 2026 +0100 Merge branch 'main' into kondrat-lig-7050-run-svelte-check-for-frontend-app.part2 commit 70a37ed Author: Kondrat Shmoylov <kondrat.shmoylov@gmail.com> Date: Tue Jan 20 14:44:26 2026 +0100 feat: update commit 6bc9623 Merge: 1d549ca aa83dcb Author: Kondrat Shmoylov <kondrat.shmoylov@gmail.com> Date: Tue Jan 20 14:26:33 2026 +0100 Merge branch 'kondrat-lig-7050-run-svelte-check-for-frontend-app.part2' of github.com:lightly-ai/lightly-studio into kondrat-lig-7050-run-svelte-check-for-frontend-app.part2 commit 1d549ca Author: Kondrat Shmoylov <kondrat.shmoylov@gmail.com> Date: Tue Jan 20 14:26:29 2026 +0100 fix issue with absent create tag dialog commit 2d0f323 Author: Kondrat Shmoylov <kondrat.shmoylov@gmail.com> Date: Tue Jan 20 14:24:31 2026 +0100 feat: clean on dev run commit aa83dcb Merge: 3f9e41a 6ed91a4 Author: Kondrat Shmoylov <kondrat.shmoylov@gmail.com> Date: Tue Jan 20 13:09:05 2026 +0100 Merge branch 'main' into kondrat-lig-7050-run-svelte-check-for-frontend-app.part2 commit 3f9e41a Author: Kondrat Shmoylov <kondrat.shmoylov@gmail.com> Date: Tue Jan 20 12:58:49 2026 +0100 feat: fix issues with TagCreateDialog.svelte commit 7d0998e Merge: 692aefd 4825c78 Author: Kondrat Shmoylov <kondrat.shmoylov@gmail.com> Date: Tue Jan 20 11:40:58 2026 +0100 Merge branch 'kondrat-lig-7050-run-svelte-check-for-frontend-app.part1' of github.com:lightly-ai/lightly-studio into kondrat-lig-7050-run-svelte-check-for-frontend-app.part1 commit 692aefd Author: Kondrat Shmoylov <kondrat.shmoylov@gmail.com> Date: Tue Jan 20 11:40:29 2026 +0100 reduce dumplicated import calls commit 4825c78 Merge: f53152b 676df02 Author: Kondrat Shmoylov <kondrat.shmoylov@gmail.com> Date: Tue Jan 20 10:45:35 2026 +0100 Merge branch 'main' into kondrat-lig-7050-run-svelte-check-for-frontend-app.part1 commit f53152b Author: Kondrat Shmoylov <kondrat.shmoylov@gmail.com> Date: Mon Jan 19 16:57:02 2026 +0100 rm commit e3cc09a Author: Kondrat Shmoylov <kondrat.shmoylov@gmail.com> Date: Mon Jan 19 16:49:23 2026 +0100 feat: reduce to 95 errors from 139 commit bd2c0e2 Author: Kondrat Shmoylov <kondrat.shmoylov@gmail.com> Date: Mon Jan 19 16:47:49 2026 +0100 feat: reduce to 95 errors from 139
6d20974 to
150c4b3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR addresses type safety issues reported by svelte-check, reducing the count from 95 to 68 errors. The changes primarily involve adding explicit type annotations, fixing type inconsistencies, migrating from lodash to lodash-es, and improving null safety through conditional rendering.
Changes:
- Added explicit type annotations for annotation labels and counts to resolve type inference issues
- Migrated from
lodashtolodash-esfor better ESM support - Added conditional rendering for components that depend on collection data
- Improved type guards and null handling in filter logic
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| +layout.svelte | Added type annotations for AnnotationLabel and AnnotationCount, added conditional rendering for Header/MenuDialogHost, fixed store usage with get() function, improved error type handling |
| useImagesInfinite.ts | Exported type guard function isNormalModeParams for better type narrowing |
| useAnnotationLabels.ts | Wrapped return statement in explicit return block for consistency |
| TagCreateDialog.svelte | Updated textEmbedding type from optional null to just optional, moved tagKind definition for better code organization, improved filter logic with type guard |
| Samples.svelte | Migrated from lodash to lodash-es |
| SampleDetailsImageContainer.svelte | Migrated to named import from lodash-es |
| PlotPanel.svelte | Migrated to named import from lodash-es |
| ImageSizeControl/index.svelte | Migrated from lodash to lodash-es |
| package.json | Added lodash-es and @types/lodash-es dependencies |
| package-lock.json | Updated lock file with new dependencies |
Files not reviewed (1)
- lightly_studio_view/package-lock.json: Language not supported
lightly_studio_view/src/lib/components/TagCreateDialog/TagCreateDialog.svelte
Show resolved
Hide resolved
...tudio_view/src/routes/datasets/[dataset_id]/[collection_type]/[collection_id]/+layout.svelte
Outdated
Show resolved
Hide resolved
...tudio_view/src/routes/datasets/[dataset_id]/[collection_type]/[collection_id]/+layout.svelte
Show resolved
Hide resolved
...tudio_view/src/routes/datasets/[dataset_id]/[collection_type]/[collection_id]/+layout.svelte
Show resolved
Hide resolved
...tudio_view/src/routes/datasets/[dataset_id]/[collection_type]/[collection_id]/+layout.svelte
Show resolved
Hide resolved
...tudio_view/src/routes/datasets/[dataset_id]/[collection_type]/[collection_id]/+layout.svelte
Outdated
Show resolved
Hide resolved
…2' of github.com:lightly-ai/lightly-studio into kondrat-lig-7050-run-svelte-check-for-frontend-app.part2
…2' of github.com:lightly-ai/lightly-studio into kondrat-lig-7050-run-svelte-check-for-frontend-app.part2
What has changed and why?
This PR fixes issues reported by svelte-check
npm run checkcommandHow has it been tested?
By running
npm run checkand testing it locally as wellDid you update CHANGELOG.md?