@zairakai/js-dev-tools 1.3.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/scripts/typecheck.sh +13 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zairakai/js-dev-tools",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"description": "The unified and centralized development toolkit for JavaScript/TypeScript projects - ESLint, Prettier, Stylelint, Knip, Vitest, Git Hooks, and GitLab CI pipeline templates",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dev-tools",
|
package/scripts/typecheck.sh
CHANGED
|
@@ -15,11 +15,10 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
|
15
15
|
source "${SCRIPT_DIR}/config.sh"
|
|
16
16
|
|
|
17
17
|
TSC_BIN="${BIN_DIR}/tsc"
|
|
18
|
+
VUE_TSC_BIN="${BIN_DIR}/vue-tsc"
|
|
18
19
|
|
|
19
20
|
log_header "TypeScript Type Checking"
|
|
20
21
|
|
|
21
|
-
ensure_bin "$TSC_BIN" "tsc (typescript)"
|
|
22
|
-
|
|
23
22
|
if [[ ! -f "${PROJECT_ROOT}/tsconfig.json" ]]; then
|
|
24
23
|
log_error "No tsconfig.json found at project root"
|
|
25
24
|
log_info "Publish one with:"
|
|
@@ -30,12 +29,20 @@ fi
|
|
|
30
29
|
log_info "Config: tsconfig.json"
|
|
31
30
|
log_info "Mode: --noEmit (type validation only)"
|
|
32
31
|
|
|
33
|
-
# Skip gracefully if no .ts files are found
|
|
34
|
-
if ! has_files "${PROJECT_ROOT}/**/*.ts" && ! has_files "${PROJECT_ROOT}/**/*.tsx"; then
|
|
35
|
-
log_info "No TypeScript files found — skipping"
|
|
32
|
+
# Skip gracefully if no .ts/.vue files are found
|
|
33
|
+
if ! has_files "${PROJECT_ROOT}/**/*.ts" && ! has_files "${PROJECT_ROOT}/**/*.tsx" && ! has_files "${PROJECT_ROOT}/**/*.vue"; then
|
|
34
|
+
log_info "No TypeScript or Vue files found — skipping"
|
|
36
35
|
exit 0
|
|
37
36
|
fi
|
|
38
37
|
|
|
39
|
-
|
|
38
|
+
# Prefer vue-tsc when available (handles .vue SFC imports correctly)
|
|
39
|
+
if [[ -x "$VUE_TSC_BIN" ]]; then
|
|
40
|
+
log_info "Checker: vue-tsc (Vue SFC support)"
|
|
41
|
+
"$VUE_TSC_BIN" --noEmit
|
|
42
|
+
else
|
|
43
|
+
ensure_bin "$TSC_BIN" "tsc (typescript)"
|
|
44
|
+
log_info "Checker: tsc"
|
|
45
|
+
"$TSC_BIN" --noEmit
|
|
46
|
+
fi
|
|
40
47
|
|
|
41
48
|
log_success "TypeScript type checking passed"
|