Skip to content

Commit 3b44b03

Browse files
committed
build: add lint-ts
1 parent 31f3480 commit 3b44b03

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

Makefile

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1416,6 +1416,16 @@ lint-js-ci:
14161416
jslint-ci: lint-js-ci
14171417
$(warning Please use lint-js-ci instead of jslint-ci)
14181418

1419+
LINT_TS_TSC = tools/typescript/node_modules/typescript/bin/tsc
1420+
LINT_TS_CONFIG = tools/typescript/tsconfig.json
1421+
1422+
run-lint-ts = $(LINT_TS_TSC) --project $(LINT_TS_CONFIG)
1423+
1424+
.PHONY: lint-ts
1425+
lint-ts:
1426+
$(info Running TSC...)
1427+
@$(call available-node,$(run-lint-ts))
1428+
14191429
LINT_CPP_ADDON_DOC_FILES_GLOB = test/addons/??_*/*.cc test/addons/??_*/*.h
14201430
LINT_CPP_ADDON_DOC_FILES = $(wildcard $(LINT_CPP_ADDON_DOC_FILES_GLOB))
14211431
LINT_CPP_EXCLUDE ?=
@@ -1567,6 +1577,7 @@ ifneq ("","$(wildcard tools/eslint/node_modules/eslint/)")
15671577
lint: ## Run JS, C++, MD and doc linters.
15681578
@EXIT_STATUS=0 ; \
15691579
$(MAKE) lint-js || EXIT_STATUS=$$? ; \
1580+
$(MAKE) lint-ts || EXIT_STATUS=$$? ; \
15701581
$(MAKE) lint-cpp || EXIT_STATUS=$$? ; \
15711582
$(MAKE) lint-addon-docs || EXIT_STATUS=$$? ; \
15721583
$(MAKE) lint-md || EXIT_STATUS=$$? ; \
@@ -1575,7 +1586,7 @@ lint: ## Run JS, C++, MD and doc linters.
15751586
CONFLICT_RE=^>>>>>>> [[:xdigit:]]+|^<<<<<<< [[:alpha:]]+
15761587

15771588
# Related CI job: node-test-linter
1578-
lint-ci: lint-js-ci lint-cpp lint-py lint-md lint-addon-docs lint-yaml-build lint-yaml
1589+
lint-ci: lint-js-ci lint-ts lint-cpp lint-py lint-md lint-addon-docs lint-yaml-build lint-yaml
15791590
@if ! ( grep -IEqrs "$(CONFLICT_RE)" --exclude="error-message.js" --exclude="merge-conflict.json" benchmark deps doc lib src test tools ) \
15801591
&& ! ( $(FIND) . -maxdepth 1 -type f | xargs grep -IEqs "$(CONFLICT_RE)" ); then \
15811592
exit 0 ; \

0 commit comments

Comments
 (0)