mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-25 16:55:59 +03:00
[PR #3472] [MERGED] chore(common): implement enforced pre-commit type checks for FE service files #4395
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#4395
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/hoppscotch/hoppscotch/pull/3472
Author: @jamesgeorge007
Created: 10/25/2023
Status: ✅ Merged
Merged: 11/2/2023
Merged by: @AndrewBastin
Base:
release/2023.8.3← Head:services-type-check📝 Commits (9)
993133fchore: perform type check for FE service filesba6e098chore: updatedo-typecheckscriptfd08fbffix: use absolute path while checking against the directory pathe4af695fix: existing type error in scope26191acfix: make the script agnostic of the path it is getting executed fromfa62478fix: resolve tsconfig path relative to the workspace root867340brefactor: rewrite following ESM semantics856e597feat: add the ability to work with multiple directory pathsace4a48feat: add the ability to work with multiple file patterns📊 Changes
4 files changed (+931 additions, -718 deletions)
View changed files
📝
packages/hoppscotch-common/package.json(+2 -1)📝
packages/hoppscotch-common/src/modules/i18n.ts(+7 -2)➕
packages/hoppscotch-common/type-check.mjs(+92 -0)📝
pnpm-lock.yaml(+830 -715)📄 Description
Description
This PR aims at performing type checks for TS files for FE services source files as part of the pre-commit hook.
type-check.mjsscript at thehoppscotch-commonpackage root that performs type check on TS files under theservicesdirectory leveraging the TS and Vue TSC compiler APIs. Files under**/__tests__/**&.d.tsbased are ignored while performing type check. ThefindFilesToPerformTypeCheckhelper function accepts the list of directory paths and file patterns where type checking will be performed.globas a dev dependency consumed while compiling TS files in the given directory.do-typecheckscript to invoke the above script, configured to run as part of the pre-commit hook.Closes HFE-249.
Demo
https://github.com/hoppscotch/hoppscotch/assets/25279263/1b356afb-d6e7-4721-875d-4aa50b933ea6
Checks
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.