Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create-svelte: add svelte-check for TS #1556

Merged
merged 3 commits into from
May 28, 2021

Conversation

dummdidumm
Copy link
Member

This add svelte-check along with two validate scripts to the package.json if the user selects TS. This uncovered missing type definitions for the cookie package in the default template, which are now added as well if the user selects TS.

Closes #1536 , if noone has objections to doing it this way. Alternatives:

  • add this to svelte-kit. This would add needless dependencies for those who don't want to use it, and does not bring any benefit to me as it only hides the invocation and cannot add any deeper integration
  • adjust the TS templates so that svelte-check is always invoked prior to svelte-kit. I'm slightly in favor of this, but it slows down the build a little obviously

This add svelte-check along with two validate scripts to the package.json if the user selects TS. This uncovered missing type definitions for the cookie package in the default template, which are now added as well if the user selects TS.
Copy link
Member

@ignatiusmb ignatiusmb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really nice addition, especially for TS users

Copy link
Member

@benmccann benmccann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. only reason I'm not merging is in case you wanted more opinions on how to setup the package.json commands first. but if you're happy with how it is then I'd say go ahead and hit the green button

@dummdidumm
Copy link
Member Author

I'll wait a little more, also because there's likely a new major version of svelte-check very soon which I'd use here then.

@dummdidumm dummdidumm merged commit 1739443 into master May 28, 2021
@dummdidumm dummdidumm deleted the add-svelte-check-to-ts-starter branch May 28, 2021 10:44
sidharthv96 added a commit to sidharthv96/kit that referenced this pull request May 29, 2021
* 'master' of https://github.com/sveltejs/kit:
  Version Packages (next) (sveltejs#1543)
  type fixes for adapter-node and adapter-static (sveltejs#1578)
  Upgrade to Vite 2.3.3 (sveltejs#1580)
  fix: improve getRawBody parsing & handle error(s) (sveltejs#1528)
  create-svelte: add svelte-check for TS (sveltejs#1556)
  pass validated svelte config to adapters (sveltejs#1559)
  types: group related and reduce potential inconsistencies (sveltejs#1539)
  Use sveltekit tag on StackOverflow (sveltejs#1558)
  Fix create-svelte build-template script (sveltejs#1555)
  Remove err param from Polka .listen() callback (sveltejs#1550)
  bump: polka and sirv versions (sveltejs#1548)
  svelte-kit package (sveltejs#1499)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

svelte-kit build swallows typescript errors
3 participants