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

Add TypeScript support #113

Open
openjck opened this issue Jul 27, 2020 · 3 comments
Open

Add TypeScript support #113

openjck opened this issue Jul 27, 2020 · 3 comments

Comments

@openjck
Copy link
Contributor

openjck commented Jul 27, 2020

Add optional TypeScript support. This should not interfere with JavaScript support. In other words, users should be able to write TypeScript files with .ts extensions or JavaScript files with .js extensions and either should just work without any additional configuration.

We should document this support without implying that TypeScript is required. For example, we might mention TypeScript support in the README but still use JavaScript for example code.

@openjck openjck self-assigned this Jul 29, 2020
@openjck
Copy link
Contributor Author

openjck commented Jul 30, 2020

I made some progress on this. It's pretty straightforward, but getting Prettier and ESLint to play nicely with Svelte and TypeScript has been tricky. I don't think it's impossible (although not all tools are ready, e.g. eslint-plugin-svelte3), it'll just take some creativity.

https://github.com/openjck/app-template/tree/%25archive-issue-113-typescript-support-attempt-3

@openjck
Copy link
Contributor Author

openjck commented Aug 13, 2020

Another solution worth consideration is to at least partially merge this template with sveltejs/template. We have done a good job of configuring ESLint, Prettier, EditorConfig, and other tools. That work is fairly easy, but valuable. Then we could collaborate on getting all of the above working with TypeScript.

If nothing else, merging the two would make this template much smaller, requiring only a few things like customized ESLint rules, a Google Analytics setup, and a graph-paper import.

@openjck openjck removed their assignment Aug 13, 2020
@robhudson
Copy link
Contributor

The svelte/template has a script to enable typescript in the project. We should base this app template on that and add the extra libs and configuration on top of what's already existing there.

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

No branches or pull requests

2 participants