-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
Typescript support enhance #4738
Comments
Hey @sodatea, can I work on this issue? |
Yeah go ahead, please |
Hey @zerefwayne @sodatea, could you please update |
I tried to find the source for |
https://github.com/vuejs/eslint-config-typescript Note: it's not as simple as just upgrading the dependency versions - there are breaking changes in config options too, per https://github.com/typescript-eslint/typescript-eslint/releases/tag/v2.0.0 |
thanks @sodatea, I see there is already a PR vuejs/eslint-config-typescript#3 for updating things. |
New version of |
@Mister-Hope I can't find what's missing to implement in |
It should be working now after an update to |
Since no one is getting problems any more, I am closing this issue. |
Could someone explain how to enable support for TS 3.7+? I have upgraded all my dependencies, cli plugins and eslint to latest and my code is linting fine and vscode is not showing any ts errors. However when actually being compiled Babel is complaining that it doesnt understand Thanks guys! Here are all my dev dependencies incase it helps: "devDependencies": { |
@GerryWilko I wound lilke to help you if you can create a minial example on github for me to clone. Besides, here are my package.json {
"name": "innenu-website",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build --modern",
"rebuild": "vue-cli-service build --modern --no-clean",
"analyze": "vue-cli-service build --mode analyze --modern",
"inspect": "vue-cli-service inspect --modern > modern.js",
"normal-analyze": "vue-cli-service build --mode analyze",
"normal-build": "vue-cli-service build",
"normal-inspect": "vue-cli-service inspect > normal.js",
"normal-rebuild": "vue-cli-service build --modern --no-clean",
"test:unit": "vue-cli-service test:unit",
"test:e2e": "vue-cli-service test:e2e",
"lint": "vue-cli-service lint",
"lint-fix": "vue-cli-service lint"
},
"author": "Mr.Hope",
"dependencies": {
"ant-design-vue": "^1.4.10",
"axios": "^0.19.0",
"core-js": "^3.5.0",
"github-markdown-css": "^3.0.1",
"highlight.js": "^9.17.0",
"jquery": "^3.4.1",
"lodash": "^4.17.15",
"marked": "^0.7.0",
"register-service-worker": "^1.6.2",
"viewerjs": "^1.5.0",
"vue": "^2.6.10",
"vue-class-component": "^7.1.0",
"vue-property-decorator": "^8.3.0",
"vue-router": "^3.1.3",
"vue-wechat-title": "^2.0.5",
"vuex": "^3.1.2"
},
"devDependencies": {
"@types/chai": "^4.2.7",
"@types/highlight.js": "^9.12.3",
"@types/jquery": "^3.3.31",
"@types/lodash": "^4.14.149",
"@types/marked": "0.7.2",
"@types/mocha": "^5.2.7",
"@typescript-eslint/eslint-plugin": "^2.11.0",
"@typescript-eslint/parser": "^2.11.0",
"@vue/cli-plugin-babel": "^4.1.1",
"@vue/cli-plugin-e2e-cypress": "^4.1.1",
"@vue/cli-plugin-eslint": "^4.1.1",
"@vue/cli-plugin-pwa": "^4.1.1",
"@vue/cli-plugin-router": "^4.1.1",
"@vue/cli-plugin-typescript": "^4.1.1",
"@vue/cli-plugin-unit-mocha": "^4.1.1",
"@vue/cli-plugin-vuex": "^4.1.1",
"@vue/cli-service": "^4.1.1",
"@vue/eslint-config-prettier": "^6.0.0",
"@vue/eslint-config-typescript": "^5.0.1",
"@vue/test-utils": "1.0.0-beta.30",
"babel-plugin-import": "^1.13.0",
"chai": "^4.2.0",
"eslint": "^6.7.2",
"eslint-plugin-prettier": "^3.1.1",
"eslint-plugin-vue": "^6.0.1",
"less": "^3.10.3",
"less-loader": "^5.0.0",
"prettier": "^1.19.1",
"sass": "^1.23.7",
"sass-loader": "^8.0.0",
"stylus": "^0.54.7",
"stylus-loader": "^3.0.2",
"svgo": "^1.3.2",
"typescript": "^3.7.3",
"vue-svg-loader": "^0.15.0",
"vue-template-compiler": "^2.6.10",
"webpack-bundle-analyzer": "^3.6.0"
}
} |
@GerryWilko It's because TypeScript won't transform this syntax for the Workarounds:
Or, you can wait until babel/babel#10811 is landed in babel |
@Mister-Hope @sodatea Thank you both. @sodatea I noticed this too yesterday. I have updated my ES to 2019 for now. That solves the problem. Presumably we are going to have to wait for babel/babel#10811 before Vue CLI can fully go to TS 3.7! |
What problem does this feature solve?
I suggest the official make these changes to enhance typescript support.
Now developeres still have a bad experience using typescript
let
@vue/cli-plugin-typescript
Support Typescript 3.6update
@vue/eslint-config-typescript
dependecies as@typescript-eslint V2
now fullly support vue.The text was updated successfully, but these errors were encountered: