mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 15:31:48 +00:00
This PR addresses all issues reported by svelte-check related to the packages own files. svelte-check reports many more errors but they all related to files in other packages (e.g. client/web). I haven't figured out a way yet to have svelte-check/TypeScript ignore these. What was done: - Remove React interop code (wasn't used) - Move all stories to Svelte component format and co-located them with the tested component. - Fixed TypeScript types - Fixed eslint issues - Migrated some GraphQL queries to .gql files (I think those had some errors/warnings associated with them; I'll migrate more in an upcoming commit) What hasn't worked: - Upgrading svelte-check. I mean, it works but then it reports issues with extending $$Props in some Svelte components, which is strange because that's the way to do it. Idk if it's related to our TS setup. - Migrating to eslint-plugin-svelte. This reports many more errors, including not being able to resolve aliased paths like $lib/.... This should be done eventually but requires more time to get the config right. - Making use of TypeScript project references. I probably didn't get the configuration right. I wanted to speed up pnpm check but it resulted in more errors about not being able to find types. What's still problematic: - eslint produces a bunch of warnings regarding accessing properties on any types. It looks like the eslint setup doesn't take the types generated from SvelteKit into account. Will have to investigate this.
82 lines
2.7 KiB
JSON
82 lines
2.7 KiB
JSON
{
|
|
"name": "@sourcegraph/web-sveltekit",
|
|
"version": "0.0.1",
|
|
"scripts": {
|
|
"dev": "vite dev",
|
|
"dev:dotcom": "vite dev --mode=dotcom",
|
|
"build": "vite build",
|
|
"preview": "vite preview",
|
|
"test": "playwright test",
|
|
"sync": "svelte-kit sync",
|
|
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
|
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
|
"lint": "eslint .",
|
|
"format": "prettier --config ./prettier.config.cjs --write . --plugin prettier-plugin-svelte",
|
|
"generate": "pnpm -w generate",
|
|
"storybook": "sb dev -p 6006",
|
|
"build-storybook": "sb build"
|
|
},
|
|
"devDependencies": {
|
|
"@faker-js/faker": "^8.0.2",
|
|
"@graphql-codegen/cli": "^5.0.0",
|
|
"@graphql-codegen/near-operation-file-preset": "^3.0.0",
|
|
"@graphql-codegen/typescript": "^4.0.1",
|
|
"@graphql-codegen/typescript-operations": "^4.0.1",
|
|
"@graphql-tools/utils": "^10.0.11",
|
|
"@graphql-typed-document-node/core": "^3.2.0",
|
|
"@playwright/test": "1.25.0",
|
|
"@rollup/plugin-graphql": "^2.0.4",
|
|
"@storybook/addon-essentials": "^7.2.0",
|
|
"@storybook/addon-interactions": "^7.2.0",
|
|
"@storybook/addon-links": "^7.2.0",
|
|
"@storybook/addon-svelte-csf": "^4.1.0",
|
|
"@storybook/blocks": "^7.2.0",
|
|
"@storybook/svelte": "^7.2.0",
|
|
"@storybook/sveltekit": "^7.2.0",
|
|
"@storybook/testing-library": "0.2.0",
|
|
"@sveltejs/adapter-auto": "^2.1.0",
|
|
"@sveltejs/adapter-static": "^2.0.3",
|
|
"@sveltejs/kit": "^1.22.3",
|
|
"@testing-library/svelte": "^4.0.3",
|
|
"@testing-library/user-event": "^14.4.3",
|
|
"@types/cookie": "^0.5.1",
|
|
"@types/highlight.js": "^9.12.4",
|
|
"@types/prismjs": "^1.26.0",
|
|
"eslint-plugin-storybook": "^0.6.12",
|
|
"eslint-plugin-svelte3": "^4.0.0",
|
|
"graphql": "^15.0.0",
|
|
"msw": "^1.2.3",
|
|
"msw-storybook-addon": "^1.8.0",
|
|
"prettier": "2.8.1",
|
|
"prettier-plugin-svelte": "^2.0.0",
|
|
"signale": "^1.4.0",
|
|
"storybook": "^7.2.0",
|
|
"storybook-dark-mode": "^3.0.1",
|
|
"svelte": "^4.1.1",
|
|
"svelte-check": "^3.4.6",
|
|
"tslib": "2.1.0",
|
|
"vite": "^4.4.7",
|
|
"vite-plugin-inspect": "^0.7.35",
|
|
"vitest": "^0.33.0"
|
|
},
|
|
"type": "module",
|
|
"dependencies": {
|
|
"@melt-ui/svelte": "^0.66.2",
|
|
"@popperjs/core": "^2.11.8",
|
|
"@sourcegraph/branded": "workspace:*",
|
|
"@sourcegraph/client-api": "workspace:*",
|
|
"@sourcegraph/common": "workspace:*",
|
|
"@sourcegraph/http-client": "workspace:*",
|
|
"@sourcegraph/shared": "workspace:*",
|
|
"@sourcegraph/web": "workspace:*",
|
|
"@sourcegraph/wildcard": "workspace:*",
|
|
"highlight.js": "^10.0.0",
|
|
"lodash-es": "^4.17.21",
|
|
"prismjs": "^1.29.0",
|
|
"ts-key-enum": "^2.0.12"
|
|
},
|
|
"msw": {
|
|
"workerDirectory": "static"
|
|
}
|
|
}
|