mirror of
https://github.com/juherr/kill-the-news.git
synced 2026-06-20 22:03:48 +00:00
fix(lint): close type-check gaps in client scripts and tooling
Remove unused import flagged by CI lint, then harden the toolchain so such issues are caught before push: - lint-staged now also matches .tsx/.jsx (previously .tsx files skipped the pre-commit eslint pass, which is how the error reached CI) - eslint ignores generated client bundles (gitignored, not worth linting) - typecheck now also runs the client tsconfig; the hand-written browser source was excluded from the root config and never type-checked - consolidate the window global augmentations (showToast, parseJsonResponseOrThrow) into a single client globals.d.ts; the inline declare-global blocks failed (non-module files) and masked real errors Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
+3
-2
@@ -16,11 +16,12 @@
|
||||
"test": "vitest run",
|
||||
"test:watch": "vitest",
|
||||
"test:coverage": "vitest run --coverage",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"typecheck": "tsc --noEmit && npm run typecheck:client",
|
||||
"typecheck:client": "tsc -p src/scripts/client/tsconfig.json --noEmit",
|
||||
"prepare": "husky && npm run build:client"
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.{ts,js}": [
|
||||
"*.{ts,tsx,js,jsx}": [
|
||||
"eslint --fix",
|
||||
"prettier --write"
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user