Skip to content

Commit 698796a

Browse files
committed
Ensure the tasks field for check/fmt/lint can correctly find ts/tsx files & refmt the showcase json format
1 parent b61f729 commit 698796a

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

init/src/init_test.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,14 @@ async function patchProject(dir: string): Promise<void> {
2626
// json.patch = [path.fromFileURL(new URL("../..", import.meta.url))];
2727
json.patch = [new URL("../..", import.meta.url).href];
2828

29-
// assert with this stricter rule, before adding it to initialized projects
29+
// Ensure the tasks field for check/fmt/lint can correctly find ts/tsx files
3030
json.lint.rules.include = ["verbatim-module-syntax"];
31+
json.tasks = {
32+
...json.tasks,
33+
check: "deno fmt --check . && deno lint . && deno check **/*.ts **/*.tsx",
34+
fmt: "deno fmt --check .",
35+
lint: "deno lint ."
36+
};
3137

3238
await Deno.writeTextFile(jsonPath, JSON.stringify(json, null, 2) + "\n");
3339
}

www/data/showcase.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -422,15 +422,15 @@
422422
"github": "gibbygano/wtfiscongressdoingnow",
423423
"image": "wtfcongress"
424424
},
425-
{
425+
{
426426
"title": "freshpress",
427427
"link": "https://freshpress.deno.dev",
428428
"github": "https://github.com/SisyphusZheng/freshpress",
429429
"image": "freshpress"
430430
},
431-
{
431+
{
432432
"title": "zhizheng's website",
433-
"link": "https://zhizheng.deno.dev",
433+
"link": "https://zhi.deno.dev",
434434
"github": "https://github.com/SisyphusZheng/me",
435435
"image": "zhizheng"
436436
}

0 commit comments

Comments
 (0)