Repository navigation
chore: 🔧 add more aggressive typing and linting rules - #39
Merged
Merged
Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The new lint configuration currently rejects existing code, and the coordinate type narrowing introduces an unacknowledged public API break.
Review effort: Balanced
Findings: 2
Open (6)
Numeric truthiness violates strict boolean expression linting · New Unbraced guards violate curly lint rule · New Tuple narrowing breaks existing AnnotationShape consumers · New Empty image string no longer clears the lens · New Missing snapshot baseline makes regression test ineffective · New Empty image string no longer clears the viewer · New
What changed in this PR
Tightens TypeScript, ESLint, and formatting rules while improving media handling and adopting Vite’s native path resolution.
Changes:
- Enables stricter typing, linting, and semicolon formatting.
- Improves HEIC, TIFF, PDF, selection, and image-loading handling.
- Removes
vite-tsconfig-pathsin favor of Vite’s native support.
| File | Description |
|---|---|
.prettierrc |
Requires semicolons. |
README.md |
Updates example formatting. |
cypress.config.ts |
Uses native tsconfig path resolution. |
cypress/assets/shapes.ts |
Updates fixture formatting. |
cypress/support/component.ts |
Updates Cypress setup formatting. |
cypress/support/index.d.ts |
Updates Cypress declarations. |
eslint.config.ts |
Adds stricter lint rules. |
package.json |
Removes plugin and strengthens lint command. |
pnpm-lock.yaml |
Removes plugin dependencies. |
src/common/constants.ts |
Renames Konva references and adds types. |
src/common/types.ts |
Tightens public types. |
src/components/AnnotationLens.spec.tsx |
Updates lens tests for stricter typing. |
src/components/AnnotationLens.tsx |
Adds explicit typing and image handling. |
src/components/AnnotationViewer.spec.tsx |
Updates viewer tests and selection coverage. |
src/components/AnnotationViewer.tsx |
Adds explicit typing and stricter checks. |
src/components/dynamicZoom.spec.tsx |
Updates dynamic zoom test typing. |
src/declarations.d.ts |
Applies formatting. |
src/index.ts |
Updates public export formatting. |
src/utils/canvas.spec.ts |
Updates canvas tests. |
src/utils/canvas.ts |
Tightens coordinate and return types. |
src/utils/functions.ts |
Updates Konva utilities and types. |
src/utils/getImagesFromPDF.spec.tsx |
Updates PDF image tests. |
src/utils/getImagesFromPDF.ts |
Validates page dimensions and types results. |
src/utils/getPDFPageCount.spec.tsx |
Updates page-count tests. |
src/utils/getPDFPageCount.ts |
Adds explicit return type. |
src/utils/image.spec.ts |
Updates image utility tests. |
src/utils/image.ts |
Hardens conversion and indexed access. |
src/utils/layer.ts |
Adds explicit return type. |
src/utils/orientation.ts |
Types rotation and skips zero-degree work. |
src/utils/roundTo.spec.ts |
Updates rounding tests. |
src/utils/roundTo.ts |
Adds explicit return type. |
src/utils/selection.spec.ts |
Updates selection tests. |
src/utils/selection.ts |
Tightens selection checks and typing. |
src/utils/useEventListener.ts |
Types hook and listener returns. |
src/utils/useMultiSelection.ts |
Types selection hook. |
src/utils/zoom.spec.ts |
Updates zoom tests. |
src/utils/zoom.ts |
Adds explicit zoom return types. |
tsconfig.json |
Enables stricter compiler checks. |
vite.config.ts |
Uses native tsconfig path resolution. |
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
sebastianMindee
force-pushed
the
beefier-typing-linting
branch
from
October 1, 2026 16:15
4a22071 to
b3ff8ad
Compare
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Public interfaces were converted to non-mergeable type aliases, introducing an undeclared TypeScript API break.
Review effort: Balanced
Findings: 1
Resolved since last review (6)
Unbraced guards violate curly lint rule Numeric truthiness violates strict boolean expression linting Empty image string no longer clears the viewer Missing snapshot baseline makes regression test ineffective Empty image string no longer clears the lens Tuple narrowing breaks existing AnnotationShape consumers
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
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.


PR Details
Description
Related Issue
Motivation and Context
How Has This Been Tested
Types of changes
Checklist