mirror of
https://github.com/pockethost/pockethost.git
synced 2025-06-22 14:02:31 +00:00
enh: add type checking to linting
This commit is contained in:
parent
c812cc247f
commit
a81440b725
@ -1,8 +1,10 @@
|
||||
#!/usr/bin/env sh
|
||||
. "$(dirname -- "$0")/_/husky.sh"
|
||||
|
||||
|
||||
branch="$(git rev-parse --abbrev-ref HEAD)"
|
||||
if [ "$branch" = "master" ]; then
|
||||
yarn check:types
|
||||
yarn lint
|
||||
fi
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
#!/usr/bin/env sh
|
||||
. "$(dirname -- "$0")/_/husky.sh"
|
||||
|
||||
yarn check:types
|
||||
yarn lint
|
||||
|
@ -5,6 +5,10 @@
|
||||
"license": "MIT",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"check:types": "concurrently 'yarn:check:types:*'",
|
||||
"check:types:dashboard": "cd packages/dashboard && yarn check:types",
|
||||
"check:types:common": "cd packages/common && yarn check:types",
|
||||
"check:types:daemon": "cd packages/daemon && yarn check:types",
|
||||
"lint": "prettier -c \"./**/*.{ts,js,cjs,svelte,json}\"",
|
||||
"lint:fix": "prettier -w \"./**/*.{ts,js,cjs,svelte,json}\"",
|
||||
"build": "concurrently 'yarn:build:*'",
|
||||
|
@ -4,7 +4,8 @@
|
||||
"main": "src/index.ts",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"postinstall": "cd ../.. && patch-package"
|
||||
"postinstall": "cd ../.. && patch-package",
|
||||
"check:types": "tsc --noEmit"
|
||||
},
|
||||
"dependencies": {
|
||||
"ajv": "^8.11.2",
|
||||
|
@ -3,6 +3,7 @@
|
||||
"version": "0.0.1",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"check:types": "tsc --noEmit --skipLibCheck",
|
||||
"build": "concurrently 'yarn:build:*'",
|
||||
"build:docker": "cd src/services/PocketBaseService && docker build -t pockethost/pocketbase .",
|
||||
"build:hooks": "tsup --target es5 ./src/hooks/src/*.ts -d ./pb_hooks && prettier -w \"./pb_hooks/*\"",
|
||||
|
@ -3,6 +3,7 @@
|
||||
"version": "0.4.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"check:types": "svelte-check",
|
||||
"preview": "npx http-server@latest ./build -P \"http://localhost:8080?\"",
|
||||
"dev": "DEBUG=1 source ../../.env && vite dev --force",
|
||||
"build": "vite build",
|
||||
@ -45,6 +46,7 @@
|
||||
"@types/d3-scale": "^4.0.3",
|
||||
"@types/d3-scale-chromatic": "^3.0.0",
|
||||
"@types/js-cookie": "^3.0.2",
|
||||
"@types/marked": "^4.0.8"
|
||||
"@types/marked": "^4.0.8",
|
||||
"svelte-check": "^3.5.2"
|
||||
}
|
||||
}
|
||||
|
1
packages/dashboard/src/global.d.ts
vendored
1
packages/dashboard/src/global.d.ts
vendored
@ -1,4 +1,5 @@
|
||||
import type { Tooltip } from 'bootstrap'
|
||||
import 'vite/client'
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
|
@ -4,8 +4,11 @@
|
||||
"baseUrl": "",
|
||||
"allowJs": true,
|
||||
"checkJs": true,
|
||||
"preserveValueImports": false,
|
||||
"importsNotUsedAsValues": "preserve",
|
||||
"esModuleInterop": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"noUncheckedIndexedAccess": true,
|
||||
"resolveJsonModule": true,
|
||||
"skipLibCheck": true,
|
||||
"sourceMap": true,
|
||||
@ -16,7 +19,10 @@
|
||||
"$src/*": ["./src/*"]
|
||||
},
|
||||
"types": ["./src/global.d.ts"]
|
||||
}
|
||||
},
|
||||
"include": ["src/*"],
|
||||
"exclude": ["node_modules", "**/node_modules/*"]
|
||||
|
||||
// Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias
|
||||
//
|
||||
// If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes
|
||||
|
Loading…
x
Reference in New Issue
Block a user