Closed caiquelsousa closed 4 years ago
Thanks! There are two different issues here:
fix-vscode-warnings
, where I created a Workspace settings file that disables VS Code's reformatting for JS and TS so that it only uses ESLint.$
prefix (TS 6133). This one is yet to be fixed, and it may be out of my hands for that to be the case (because I don't notice a difference when changing preprocessor options in svelte.config.js
), but it is possible to work around this for each line with // @ts-ignore
. Otherwise, you can silence all TypeScript errors/warnings in Svelte files throughout the entire project by changing "svelte.plugin.typescript.diagnostics.enable"
in Workspace settings to false
, which practically eliminates the point of TypeScript (at least in Svelte files). My relevant extensions:
I have no (relevant) extra configuration for these beyond what has been posted in the Workspace settings in the new branch.
If you can check if 1. is solved (i.e. the rollup.config.js
file you screenshotted will be correctly reformatted when you re-save the file in VS Code) and 2. is satisfactory, then I will go ahead and merge those changes into master
.
For the future, it may be worth switching away from svelte-typescript
to svelte-preprocess
, because (from looking at the README) it can support both TypeScript and PostCSS in Svelte files. In this template currently, PostCSS is compiled in a separate workflow that is not ideal, and cannot support PostCSS inside Svelte files, which is a greatly missed feature to me.
These, and new commits on the same subject, were merged to master
from #3.
Hope these work for you! Thanks!
This repo seems to be an awesome boilerplate, congrats!
I was just wondering if you have the same warning as I'm having, it seems that a lot of the TS warnings is shown since it doesn't understand the imports..
Do you have any extra config on your extensions? which ones are you using?