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

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

@ -74,7 +74,7 @@
"types": "types/index.d.ts", "types": "types/index.d.ts",
"scripts": { "scripts": {
"format": "prettier . --cache --plugin-search-dir=. --write", "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\"", "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", "build": "rollup -c && pnpm types",
"generate:version": "node ./scripts/generate-version.js", "generate:version": "node ./scripts/generate-version.js",
@ -82,7 +82,7 @@
"posttest": "agadoo src/internal/index.js", "posttest": "agadoo src/internal/index.js",
"prepublishOnly": "pnpm build", "prepublishOnly": "pnpm build",
"types": "node ./scripts/generate-dts.js", "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": { "repository": {
"type": "git", "type": "git",

Binary file not shown.

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

Loading…
Cancel
Save