Skip to content

Migrate to typescript#10

Merged
akumm2k merged 25 commits into
mainfrom
ts
Dec 14, 2025
Merged

Migrate to typescript#10
akumm2k merged 25 commits into
mainfrom
ts

Conversation

@akumm2k
Copy link
Copy Markdown
Owner

@akumm2k akumm2k commented Aug 9, 2025

Summary

This PR:

  • adds typescript project equivalent for the previous js scripts (Motivation: allowing complex app logic in the future).
  • enforces local typescript style guide.

References

#9

@akumm2k akumm2k self-assigned this Aug 9, 2025
@akumm2k akumm2k added the enhancement New feature or request label Aug 9, 2025
Comment thread ts/node_modules/.bin/acorn Outdated
@akumm2k akumm2k marked this pull request as ready for review December 9, 2025 08:34
Copilot AI review requested due to automatic review settings December 9, 2025 08:34
Copy link
Copy Markdown

Copilot AI left a 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 pull request migrates JavaScript code to TypeScript to enable more complex application logic with better type safety. The migration introduces a TypeScript build setup with ESLint, Prettier, and Vite.

Key Changes:

  • Converted three JavaScript files (age.js, invert.js, proj-highlighter.js) to TypeScript with type annotations
  • Added TypeScript compilation configuration with strict mode enabled
  • Introduced constants modules for better code organization and type safety
  • Updated HTML script tags to use ES modules from the compiled TypeScript output

Reviewed changes

Copilot reviewed 17 out of 24 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
ts/tsconfig.json TypeScript compiler configuration with strict mode, but contains invalid options
ts/src/proj_highlighter.ts Migrated project highlighter with constants, has null checking issues
ts/src/invert.ts Dark mode toggle implementation with proper null checking
ts/src/age.ts Age calculation function with improved type safety
ts/src/constants/tools.ts Tool constants with breaking change (c-sharp → csharp)
ts/src/constants/projects.ts Project constants with inconsistent naming (camelCase vs kebab-case)
ts/package.json Dependencies configuration with potentially non-existent versions
ts/eslint.config.mts ESLint flat config with syntax errors
ts/.prettierrc Code formatting rules (72-char line width, single quotes)
index.html Updated script references to use compiled TypeScript modules
Files not reviewed (1)
  • ts/package-lock.json: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread ts/src/invert.ts
Comment thread ts/eslint.config.mts
Comment thread ts/eslint.config.mts
Comment thread ts/tsconfig.json Outdated
Comment thread ts/src/constants/tools.ts
Comment thread ts/tsconfig.json Outdated
Comment thread ts/src/constants/projects.ts Outdated
Comment thread ts/src/proj_highlighter.ts Outdated
Comment thread ts/src/proj_highlighter.ts Outdated
Comment thread ts/src/proj_highlighter.ts Outdated
@akumm2k akumm2k merged commit 685be6e into main Dec 14, 2025
1 check passed
@akumm2k akumm2k deleted the ts branch December 14, 2025 23:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants