diigo-cache: lint typechecks the program scripts
scripts/tsconfig.json gives scripts/ node's types (@types/node, a new devDependency) and allows the .ts import specifiers node's type stripping needs; the worker's tsconfig still keeps node's types out. pnpm lint runs it. Generated-by: Claude Opus 5.5
This commit is contained in:
1 parent
cbde0dfbd3
commit
0006c7c3a3
2 files changed
+13
-1
No files matched your search
@@ -5,11 +5,12 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "wrangler dev -c wrangler.jsonc -c ../webapp/wrangler.jsonc",
|
"dev": "wrangler dev -c wrangler.jsonc -c ../webapp/wrangler.jsonc",
|
||||||
"types": "wrangler types",
|
"types": "wrangler types",
|
||||||
"lint": "wrangler types --check && tsc -p tsconfig.json && tsc -p tests/tsconfig.json",
|
"lint": "wrangler types --check && tsc -p tsconfig.json && tsc -p tests/tsconfig.json && tsc -p scripts/tsconfig.json",
|
||||||
"test": "vitest run"
|
"test": "vitest run"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@cloudflare/vitest-plugin": "1.3.6",
|
"@cloudflare/vitest-plugin": "1.3.6",
|
||||||
|
"@types/node": "^22",
|
||||||
"typescript": "^5.9.0",
|
"typescript": "^5.9.0",
|
||||||
"vitest": "4.1.11",
|
"vitest": "4.1.11",
|
||||||
"wrangler": "^4.148.0"
|
"wrangler": "^4.148.0"
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
// program scripts run under node (type stripping), so they get node's
|
||||||
|
// types; the worker's own tsconfig keeps them out
|
||||||
|
"extends": "../tsconfig.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"types": ["node"],
|
||||||
|
"lib": ["ES2022", "ESNext.Disposable"],
|
||||||
|
"allowImportingTsExtensions": true
|
||||||
|
},
|
||||||
|
"include": ["./**/*.ts", "../src/rss.ts", "../src/items.ts"]
|
||||||
|
}
|
||||||
Reference in new issue
Block a user