From 106c323a645af1aee5baf47062cfb65154b8132a Mon Sep 17 00:00:00 2001
From: Haoqun Jiang <haoqunjiang@gmail.com>
Date: Wed, 17 Mar 2021 15:34:53 +0800
Subject: [PATCH] feat: use TS 4.2+ in newly created projects

Fixes #6299
---
 package.json                                     | 8 ++++----
 packages/@vue/cli-plugin-eslint/eslintDeps.js    | 8 ++++----
 packages/@vue/cli-plugin-typescript/package.json | 2 +-
 packages/@vue/cli-ui/package.json                | 2 +-
 4 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/package.json b/package.json
index f0d68b6ec8..eb0c7c4c89 100644
--- a/package.json
+++ b/package.json
@@ -45,12 +45,12 @@
   },
   "devDependencies": {
     "@babel/core": "^7.11.0",
-    "@typescript-eslint/eslint-plugin": "^2.33.0",
-    "@typescript-eslint/parser": "^2.33.0",
+    "@typescript-eslint/eslint-plugin": "^4.18.0",
+    "@typescript-eslint/parser": "^4.18.0",
     "@vue/eslint-config-airbnb": "^5.0.2",
     "@vue/eslint-config-prettier": "^6.0.0",
     "@vue/eslint-config-standard": "^5.1.2",
-    "@vue/eslint-config-typescript": "^5.0.2",
+    "@vue/eslint-config-typescript": "^7.0.0",
     "@vuepress/plugin-pwa": "^1.5.0",
     "@vuepress/theme-vue": "^1.5.0",
     "babel-core": "7.0.0-bridge.0",
@@ -84,7 +84,7 @@
     "request-promise-native": "^1.0.8",
     "rimraf": "^3.0.2",
     "semver": "^6.1.0",
-    "typescript": "~3.9.3",
+    "typescript": "~4.2.3",
     "vuepress": "^1.5.0",
     "webpack": "^4.0.0",
     "yorkie": "^2.0.0"
diff --git a/packages/@vue/cli-plugin-eslint/eslintDeps.js b/packages/@vue/cli-plugin-eslint/eslintDeps.js
index ca5ce62387..b1d2ab1111 100644
--- a/packages/@vue/cli-plugin-eslint/eslintDeps.js
+++ b/packages/@vue/cli-plugin-eslint/eslintDeps.js
@@ -20,9 +20,9 @@ const DEPS_MAP = {
     'eslint-plugin-standard': '^4.0.0'
   },
   typescript: {
-    '@vue/eslint-config-typescript': '^5.0.2',
-    '@typescript-eslint/eslint-plugin': '^2.33.0',
-    '@typescript-eslint/parser': '^2.33.0'
+    '@vue/eslint-config-typescript': '^7.0.0',
+    '@typescript-eslint/eslint-plugin': '^4.18.0',
+    '@typescript-eslint/parser': '^4.18.0'
   }
 }
 
@@ -32,7 +32,7 @@ exports.getDeps = function (api, preset, rootOptions = {}) {
   const deps = Object.assign({}, DEPS_MAP.base, DEPS_MAP[preset])
 
   if (rootOptions.vueVersion === '3') {
-    Object.assign(deps, { 'eslint-plugin-vue': '^7.0.0-0' })
+    Object.assign(deps, { 'eslint-plugin-vue': '^7.0.0' })
   }
 
   if (api.hasPlugin('typescript')) {
diff --git a/packages/@vue/cli-plugin-typescript/package.json b/packages/@vue/cli-plugin-typescript/package.json
index 03b3fae152..dca79588da 100644
--- a/packages/@vue/cli-plugin-typescript/package.json
+++ b/packages/@vue/cli-plugin-typescript/package.json
@@ -52,7 +52,7 @@
     "@types/jest": "^24.0.19",
     "@types/mocha": "^5.2.6",
     "jscodeshift": "^0.10.0",
-    "typescript": "~3.9.3",
+    "typescript": "~4.2.3",
     "vue-class-component": "^7.2.3",
     "vue-property-decorator": "^9.1.2"
   }
diff --git a/packages/@vue/cli-ui/package.json b/packages/@vue/cli-ui/package.json
index 2054742c46..f8013d4351 100644
--- a/packages/@vue/cli-ui/package.json
+++ b/packages/@vue/cli-ui/package.json
@@ -60,7 +60,7 @@
     "prismjs": "^1.20.0",
     "rss-parser": "^3.8.0",
     "shortid": "^2.2.15",
-    "typescript": "~3.9.3",
+    "typescript": "~4.2.3",
     "watch": "^1.0.2"
   },
   "devDependencies": {