Skip to content

Commit 574323f

Browse files
committed
Added eslint support for Node.js template
1 parent b990215 commit 574323f

File tree

8 files changed

+11756
-9159
lines changed

8 files changed

+11756
-9159
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-node ## 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-node
157+
check-node: ## Check Node templates' source
158+
cd templates/node/cloudevents && npm ci && npm run lint
159+
cd templates/node/http && npm ci && npm run lint
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

generate/zz_filesystem_generated.go

Lines changed: 9746 additions & 9150 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import js from "@eslint/js";
2+
import globals from "globals";
3+
import { defineConfig } from "eslint/config";
4+
5+
export default defineConfig([
6+
{ files: ["**/*.{js,mjs,cjs}"], plugins: { js }, extends: ["js/recommended"], languageOptions: { globals: globals.browser } },
7+
{ files: ["**/*.js"], languageOptions: { sourceType: "commonjs" } },
8+
]);

0 commit comments

Comments
 (0)