Skip to content

Commit c9d4c54

Browse files
authored
Add ESLint check for TypeScript templates (knative#3147)
1 parent 3d1ee5e commit c9d4c54

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ check-embedded-fs: ## Check the embedded templates FS
139139

140140
# TODO: add linters for other templates
141141
.PHONY: check-templates
142-
check-templates: check-go check-rust ## Run template source code checks
142+
check-templates: check-go check-rust check-typescript ## Run template source code checks
143143

144144
.PHONY: check-go
145145
check-go: ## Check Go templates' source
@@ -153,6 +153,11 @@ check-rust: ## Check Rust templates' source
153153
cd templates/rust/cloudevents && cargo clippy && cargo clean
154154
cd templates/rust/http && cargo clippy && cargo clean
155155

156+
.PHONY: check-typescript
157+
check-typescript: ## Check TypeScript templates' source
158+
cd templates/typescript/cloudevents && npm ci && npx eslint --ext .ts . && rm -rf node_modules build
159+
cd templates/typescript/http && npm ci && npx eslint --ext .ts . && rm -rf node_modules build
160+
156161
.PHONY: test-templates
157162
test-templates: test-go test-node test-python test-quarkus test-springboot test-rust test-typescript ## Run all template tests
158163

0 commit comments

Comments
 (0)