bencodezen / vue-enterprise-boilerplate

An ever-evolving, very opinionated architecture and dev environment for new Vue SPA projects using Vue CLI.
7.77k stars 1.32k forks source link

Problems with converting boilerplate to TypeScript #194

Closed TNSaturday closed 4 years ago

TNSaturday commented 4 years ago

I like your template but I want to use TypeScript version of it to be able to use class based components. I've followed your guide:

  1. Use @vue/cli-plugin-typescript instead of @vue/cli-plugin-babel (while deleting .babelrc.js).
  2. Update jsconfig.template.js and aliases.config.js to generate a tsconfig.json file instead of > jsconfig.json.
  3. Configure ESLint to use the TypeScript parser instead of Babel.
  4. Similarly, configure Jest to use the TypeScript parser instead of Babel.

but had no success. Just as the guy over there. It seems to me there is just not enough information on how exactly one should do it. For example, how should I configure ESLint or Jest? Moreover, ESLint itself has changed since then: the one available by the link in original post is deprecated. Vue 3 is on the way, maybe you can drop a quick guide about converting to TS?

chrisvfritz commented 4 years ago

I unfortunately don't have the capacity to provide a comprehensive guide on using TypeScript with Vue, but I recommend checking out other boilerplate projects that support TypeScript for a comprehensive example of that integration.