Skip to content

chore: 🔧 add more aggressive typing and linting rules - #39

Merged
sebastianMindee merged 3 commits into
build-chainfrom
beefier-typing-linting
Oct 1, 2026
Merged

sebastianMindee merged 3 commits into
build-chainfrom
beefier-typing-linting

Conversation

@sebastianMindee

@sebastianMindee sebastianMindee commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator

PR Details

Description

  • fix some typing issues
  • force explicit return types
  • remove some unused vite deps
  • force commas

Related Issue

Motivation and Context

How Has This Been Tested

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have added type hints (flow) to cover my changes.
  • All new and existing tests passed.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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 High severity · 4 Medium severity

Open (6)
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-paths in 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.

Comment thread eslint.config.ts
Comment thread eslint.config.ts Outdated
Comment thread src/common/types.ts Outdated
Comment thread src/components/AnnotationLens.tsx Outdated
Comment thread src/components/AnnotationViewer.spec.tsx Outdated
Comment thread src/components/AnnotationViewer.tsx Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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 Medium severity

Open (1)
Resolved since last review (6)
Files not reviewed (1)
  • pnpm-lock.yaml: Generated file

Comment thread src/common/types.ts
@sebastianMindee
sebastianMindee merged commit 9f6f8cb into build-chain Oct 1, 2026
3 checks passed
@sebastianMindee sebastianMindee mentioned this pull request Oct 8, 2026
11 tasks done
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