Skip to content

feat: enhance code quality with type hints and automated JS/TS formatting - #463

Open
nhatlong90 wants to merge 2 commits into
nextlevelbuilder:mainfrom
nhatlong90:feat/add-type-hints
Open

feat: enhance code quality with type hints and automated JS/TS formatting#463
nhatlong90 wants to merge 2 commits into
nextlevelbuilder:mainfrom
nhatlong90:feat/add-type-hints

Conversation

@nhatlong90

Copy link
Copy Markdown
Contributor

What this PR does? This PR safely applies the remaining improvements we planned without causing any massive breaking changes to the Python codebase: 1. Type Hints: Added Python type hints to the main engine functions (\search.py\ & \core.py) to improve developer experience and autocompletion for contributors. 2. Prettier Formatting: Formatted all .js\ and .ts\ files across the repo (especially in \cli\ and \gallery) using Prettier to ensure consistent code styles. 3. Lint CI Workflow: Added a .github/workflows/lint.yml\ action that runs \prettier --check\ to ensure future PRs maintain this clean JavaScript/TypeScript formatting. Note: I held off on adding Ruff/Flake8 for Python to avoid a massive 400+ file diff that might be hard for you to review at once.

- Added type hints to python search engine for better developer experience

- Formatted all JS/TS code with Prettier

- Added Prettier linting to GitHub Actions CI

@clark-cant clark-cant left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Request changes

Important — reproducible lint gate: .github/workflows/lint.yml installs prettier globally without a version, while this branch does not add a repository-owned Prettier dependency, lockfile entry, or configuration. The check can therefore change with whatever release npm serves on a future runner, and contributors cannot reproduce the exact formatter/version locally. Please add and pin Prettier in the appropriate workspace manifest/lockfile, commit the intended config (or explicitly preserve documented existing config), and run that local command from CI. The formatting-only changes should then be regenerated/verified with that pinned version.

Mandatory gates: duplicate/prior work: clear for #463 (closed #114 is broader historical type-safety work); project standards: repository toolchain inspected, no checked-in Prettier setup found; strategic necessity: clear DX/consistency value, but the new CI gate must be deterministic.

Risk: medium — 26 files / +906 -569 are primarily formatting, yet the new nondeterministic CI policy affects every future JS/TS change.

@clark-cant clark-cant added agent:github-maintain Processed by github-maintain automation maintain:deferred Deferred by maintain workflow pr:oversized Too large for cron-safe review budget labels Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent:github-maintain Processed by github-maintain automation maintain:deferred Deferred by maintain workflow pr:oversized Too large for cron-safe review budget

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants