chore: run tsc properly (#8884)

Runs type check as part of the CI. This needs a new path alias in the tsconfig so that TS resolves the svelte import in the ambient file directly to the correct d.ts file and doesn't load Svelte through the node_modules, at which point it would load the generated ambient type definitions and throw a duplicate definitions error.

Also removes a tgz that was accidentally added
pull/8898/head
Simon H 1 year ago committed by GitHub
parent d2ff04f9fe
commit 2f5e371046
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -7,7 +7,7 @@ permissions:
contents: read # to fetch code (actions/checkout)
env:
# We only install Chromium manually
# We only install Chromium manually
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: '1'
jobs:

@ -9,7 +9,7 @@
"build": "pnpm -r --filter=./packages/* build",
"build:sites": "pnpm -r --filter=./sites/* build",
"check": "cd packages/svelte && pnpm build && cd ../../ && pnpm -r check",
"lint": "pnpm -r lint",
"lint": "cd packages/svelte && pnpm build && cd ../../ && pnpm -r lint",
"format": "pnpm -r format",
"changeset:version": "changeset version && pnpm -r generate:version && git add --all",
"changeset:publish": "changeset publish"

@ -74,7 +74,7 @@
"types": "types/index.d.ts",
"scripts": {
"format": "prettier . --cache --plugin-search-dir=. --write",
"check": "prettier . --cache --plugin-search-dir=. --check",
"check": "tsc --noEmit",
"test": "vitest run && echo \"manually check that there are no type errors in test/types by opening the files in there\"",
"build": "rollup -c && pnpm types",
"generate:version": "node ./scripts/generate-version.js",
@ -82,7 +82,7 @@
"posttest": "agadoo src/internal/index.js",
"prepublishOnly": "pnpm build",
"types": "node ./scripts/generate-dts.js",
"lint": "eslint \"{src,test}/**/*.{ts,js}\" --cache"
"lint": "prettier . --cache --plugin-search-dir=. --check && eslint \"{src,test}/**/*.{ts,js}\" --cache"
},
"repository": {
"type": "git",

Binary file not shown.

@ -35,6 +35,9 @@
"noImplicitThis": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"typeRoots": ["./node_modules/@types"]
"typeRoots": ["./node_modules/@types"],
"paths": {
"svelte": ["./src/runtime/public.d.ts"]
}
}
}

Loading…
Cancel
Save