2

GOAL I am trying to setup Typescript, Vue, and Vuetify in Codesandbox, but it seems like nothing will cooperate.

I copied code straight from a normal Vue app initialized with Vue CLI and it doesn't work :/

PROBLEM

Typescript will not recognize .vue files (such as import App from "@/App.vue"; in main.ts)

In App.vue, eslint keeps flagging @ from the @Component decorator EVEN though I set a parser in .eslintrc.js

ATTEMPTED SOLUTIONS

I tried to solve the problem with Typescript not recognizing .vue files using Importing Vue components in TypeScript file BUT it doesn't work anymore. Also, this implementation makes every import hyperlink go to vue-shim.d.ts. When I CNTRL click the import to go to the imported file's contents, I go to vue-shim.d.ts instead of to the imported file.

I tried solving the @Component decorator problem with eslint using ESLint unexpected character '@' for JS decorators BUT it did nothing.

CODE

https://codesandbox.io/s/infallible-framework-pjbx1?file=/src/App.vue

Denis Tsoi
  • 9,428
  • 8
  • 37
  • 56
Eric Wang
  • 419
  • 2
  • 6
  • 23

0 Answers0